Excel workbook gets opened repeatedly after closing
问题 I have used the method Application.ontime() for scheduling some macros.After closing the workbook, it gets opened again and again. to overcome this problem, I set another event on workbook- BeforeClosed. Now it is showing runtime error 1004:Method 'OnTime' of 'Object'_Application failed.I am not getting why this happening even after reffering the help context from web. Below code is given. Private Sub Workbook_Open() starttime = Now + TimeValue("00:02:00") Application.OnTime EarliestTime: