View Single Post
  #10   Report Post  
Posted to microsoft.public.excel.programming
Ron Ruble Ron Ruble is offline
external usenet poster
 
Posts: 7
Default Auto_Open not running when file opened normally


"Peter Huang [MSFT]" wrote in message ...
Hi Ron,

I can not reproduce the problem. Did you tried my suggest in my last post?


Yes, I did. see msg id:

It is necessary for me to troubleshoot the problem, and will help me narrow
down your problem more quickly. Please have a try and let me know the
result.

Here is a link you may have a look.
http://office.microsoft.com/assistan...010346281033&C
TT=6&Origin=EC010553071033

The WorkBook_Open is a event which will be trigger every time the
workbook_open is opened.
while the Auto_Open is a specific macro which will be invoke by Excel.
So the time problem may be related with how many code will be executed in
the Auto_Open or WorkBook_Open macro.


That link has no new information for me, I'm afraid.

See the other reply. Auto_open just displays a messagebox, then registers
an OnTime function to perform the processing.

As I said in my reply to Dave Peterson:

"Dave Peterson" wrote in message ...
I'm not sure that this'll help, but I saw a reference/guess to timing. And I've
see some posts that suggest doing this sometimes helps with timing issues in
auto_open procedures:

Sub Auto_Open()
Application.OnTime Now, "Continue_Auto_open"
End Sub

Sub Continue_Auto_open()
' the real part of your code goes here
End Sub


In fact, this is what we do in Auto_Open.
We use a third party tool that interfaces with Excel
(Essbase OLAP add in), which barfs if the workbook
that loads us is still active.

The problem is that we never hit the auto_open function
to register the OnTime function.

For debugging purposes I have a messagebox in the
Auto_Open like so:

Sub Auto_Open()
MsgBox "Hit Auto_Open"
Application.OnTime Now, "Continue_Auto_open"
End Sub

But we never get the message box.