i am having issues with the Application.OnTime method. It works great when I open the workbook but gives my the "method 'OnTime' of object'_Application' failed" error when i try and close the workbook. Any ideas or fixes would be great
/c
Private Sub Workbook_BeforeClose(Cancel As Boolean)
Application.OnTime dTime, "Sheet11.AutoSaveAs", , False <-------Error occurs here
End Sub
Private Sub Workbook_Open()
dTime = Time + TimeValue("00:01:00")
Application.OnTime dTime, "Sheet11.AutoSaveAs"
End Sub
/c
/c
Private Sub Workbook_BeforeClose(Cancel As Boolean)
Application.OnTime dTime, "Sheet11.AutoSaveAs", , False <-------Error occurs here
End Sub
Private Sub Workbook_Open()
dTime = Time + TimeValue("00:01:00")
Application.OnTime dTime, "Sheet11.AutoSaveAs"
End Sub
/c
Last edited: