OnTime event not firing in Workbook_Open event procedure

G

GingerTommy

I am experiencing a problem with Excel 97 and OnTime.

I have placed the following code in a Workbook_Open event procedure:

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.
 

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