View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
GingerTommy GingerTommy is offline
external usenet poster
 
Posts: 4
Default OnTime event not firing in Workbook_Open event procedure

I am experiencing a problem with Excel 97 and OnTime.

I have placed the following code in a Workbook_Open event procedu

Debug.Print "Workbook_Open"
Application.OnTime Now() + TimeValue("00:00:01"), "MShared.Main"

When I open the workbook the file menu, or by double-clicking in file
explorer, the Workbook_Open code and the OnTime macro fires as
expected.
The problem comes when I open the workbook using:

Workbooks.Open "F:\CMT\CMT.xla"

The Workbook_Open event fires (I know this because the debug statement
is run) but the OnTime procedure never gets called.

I have tried increasing the interval for the OnTime to 5 seconds,
still no joy.
Has anyone experienced this behaviour before? Any resolutions?

TIA, Thomas.