D'you know: Workbook_Open is not called first(!)

J

JoeU2004

Did you know that Workbook_Open is __not__ called first when a workbook is
opened?

Of course, the macro security check occurs first. That's expected.

But then all formulas with volatile functions (UDFs as well as internal
functions like RAND and NOW) are calculated first as well as any dependent
cells, if the calculation mode is Automatic.

I'm probably the only the VB programmer for whom this comes as a surprise.
I'm learning by experimentation. But I thought I'd pass along the
observation, just in case it is news to one other person ;-).

I cannot think of too many consequences of this "disorder". I 'spose it
could matter to someone who wants to record the time (and date) when the
workbook is opened. That time will be incorrect if there is a significant
amount of volatile calculation (like many minutes worth).

Then again, the only application that I can think of where that might be the
case is a simulation model. But in that case, I would expect the
calculation mode is Manual.
 
P

Patrick Molloy

the workbook's OPEN event will fire first, then if there is one, an Auto_Open
sub will run
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top