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.
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.