Excel Events - before WorkbookOpen

Add-in Express™ Support Service
That's what is more important than anything else

Excel Events - before WorkbookOpen
set EnableCalculation = false before workbookopen 
nitin c




Posts: 79
Joined: 2007-05-18
Hi,

I have a UDF which is marked Volatile and gets data from internet. When I save a workbook, restart excel and open this saved workbook, then I dont have any control of Excel before the workbookOpen event.

I want to check not network connectivity and set EnableCalculation = false, so that my previous data is retained.

How can I achieve this?
Posted 22 May, 2007 10:37:09 Top
Sergey Grischenko


Add-in Express team


Posts: 7233
Joined: 2004-07-05
Hi Nitin.

You can use the AddinInitialize or AddinStartupComplete event handlers of the ExcelAddinModule class to check the network connectivity.


P.S. Note that we take up your forum requests in the order we receive them.
Besides, it may take us some time to investigate your issue. Please be sure we will let you know as soon as the best possible solution is found.
Posted 22 May, 2007 11:40:56 Top
nitin c




Posts: 79
Joined: 2007-05-18
Hey Sergey,

AddinInitialize and AddinStartupComplete are fired when you first launch excel, I want to do this later on after excel( and addin ) is up and running.

Thanks,
Nitin
Posted 23 May, 2007 01:04:19 Top
Sergey Grischenko


Add-in Express team


Posts: 7233
Joined: 2004-07-05
Nitin,
there are not other events in the Excel Automation add-ins after the AddinStartupComplete event.
Posted 23 May, 2007 09:18:50 Top
nitin c




Posts: 79
Joined: 2007-05-18
Hi Sergey,

I have tried with AddinInitialize too... but Excel starts calculating my UDF event before AddinInitialize. Isnt there any way to prevent that.

Thanks,
Nitin
Posted 23 May, 2007 15:13:42 Top
Sergey Grischenko


Add-in Express team


Posts: 7233
Joined: 2004-07-05
Nitin, you could define a global variable and set it to true after the AddinInitialize event fires. And until then it is false, your code should return old values.
Posted 24 May, 2007 07:54:47 Top