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