Dr. Watson with OnTime in Excel VBA Macro
Posted on 2001-08-16
I have constructed the following test set of macros to check out the OnTime method (it moves the cursor after 5 seconds):
Application.OnTime Now + TimeValue("00:00:5"), ThisWorkbook.Name & "!GoB4"
If I put it in my Personal.xls, it works fine in a test workbook and also in my big workbook -- but if I put it in the workbooks' own modules, it works OK in the test workbook, but gives me a Dr. Watson Exception: access violation (0xc0000005), Address 0x00000000 every time in my big workbook. What sorts of difference between workbooks could give rise to this behavior?