A
Alan Moseley
Hi
I am writing an Excel addin using Visual Studio 2005 via the Shared Add-in
project. I understand that I can handle the WorkbookOpen event of Excel by
the following:-
Imports Microsoft.Office.Interop.Excel
Dim WithEvents objExcel as New Application
Public Sub objExcel_WorkbookOpen(wb as Workbook) Handles objExcel.WorkbookOpen
'Some code here to run when a workbook is opened
End Sub
However, I would like to create objExcel using late binding, ie.
Dim WithEvents objExcel as Object = CreateObject("Microsoft.Excel")
How do I go about handling the WorkbookOpen event now?
Thanks in advance.
I am writing an Excel addin using Visual Studio 2005 via the Shared Add-in
project. I understand that I can handle the WorkbookOpen event of Excel by
the following:-
Imports Microsoft.Office.Interop.Excel
Dim WithEvents objExcel as New Application
Public Sub objExcel_WorkbookOpen(wb as Workbook) Handles objExcel.WorkbookOpen
'Some code here to run when a workbook is opened
End Sub
However, I would like to create objExcel using late binding, ie.
Dim WithEvents objExcel as Object = CreateObject("Microsoft.Excel")
How do I go about handling the WorkbookOpen event now?
Thanks in advance.