I've got the code below in an Excel Addin Proect in VB.Net:
Public Class ThisAddIn
Private Sub Application_WorkbookOpen(Wb As Microsoft.Office.Interop.Excel.Workbook) Handles Application.WorkbookOpen
Beep()
MsgBox("fad")
End Sub
End Class
This was generated by the VB editor. It is the event handler for when the workbook is opened. When I press F5 and run the code, apparently the event handler doesn't execute. Any Ideas?
Edit: The event handler will run if I open a workbook from the workbook that opens, but will not run for the original workbook itself.
Well, you know the Open event is not called when Excel starts, the event is called only when you open an existing workbook.
There is an event **NewWorkbook* which interestingly enough is not fired either ...
I found a way how to handle with this but have to say I tested only for 1 minute, give it a try and let us know