Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,059
Default D'you know: Workbook_Open is not called first(!)

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.

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,298
Default D'you know: Workbook_Open is not called first(!)

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



"JoeU2004" wrote:

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.


Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Sub Workbook_Open not called when opening spreadsheet dhputnam Excel Programming 6 September 11th 08 08:32 PM
Workbook_Open Sub not called when spreadsheet is opened dhputnam Excel Programming 1 September 4th 08 01:37 PM
RTD methods in excel called before workbook_open event [email protected] Excel Programming 0 April 30th 08 03:44 PM
Run Workbook_Open only if called Jarek[_14_] Excel Programming 0 September 18th 04 10:05 AM
Run Workbook_Open only if called Jarek[_13_] Excel Programming 1 September 17th 04 03:10 PM


All times are GMT +1. The time now is 07:49 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"