Does anyone know why, when I load a workbook (double clicking on an .xls file that is already created) my OnConnection gets called on my Add-in before the workbook gets loaded. This causes my ((Microsoft.Office.Interop.Excel.Application)application).ActiveWorkbook
to be null.
If I just open Excel from the Excel shortcut, it will load Book1.xls (the default book) and my ActiveWorkbook will be instantiated.
Why is it like this, and what can I do to get my ActiveWorkbook to load before my OnConnection gets called when I load from a file.
I am using Excel 2003 SP3