Skip to content

Instantly share code, notes, and snippets.

@fantasticswallow
Last active August 29, 2015 14:15
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save fantasticswallow/7f3d7bcc8585cecbdaf4 to your computer and use it in GitHub Desktop.
Save fantasticswallow/7f3d7bcc8585cecbdaf4 to your computer and use it in GitHub Desktop.
Imports System.Windows.Forms
Imports Microsoft.Office.Interop.Excel
Public Class ThisAddIn
Private Sub ThisAddIn_Startup() Handles Me.Startup
'AddHandler Application.WorkbookOpen, AddressOf Application_WorkbookOpen
AddHandler Application.WorkbookOpen, wbWorkbookOpenSub2
End Sub
Private Sub ThisAddIn_Shutdown() Handles Me.Shutdown
End Sub
Private Sub Application_WorkbookOpen(wb As Workbook)
MessageBox.Show("Opened")
End Sub
Private Shared wbWorkbookOpenSub2 As AppEvents_WorkbookOpenEventHandler = Sub(Wb As Microsoft.Office.Interop.Excel.Workbook)
MessageBox.Show("Opened")
End Sub
End Class
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment