Hi all
I have made a VBA code there saves and publish a .htm file every 3 minut.
My problem is that 2-3 times a week a get this error message in excel:
This stops the code and VBA will not start before I have pushed the "OK" button
Can I in any way disable this error or make a workaround? I have tried to make an error handler there jumped to the timer (I hoped it would wait 3 minuts again and try again) but it didn't work. i have tried the classic disable alerts - but no luck there either
This is my code:
I have made a VBA code there saves and publish a .htm file every 3 minut.
My problem is that 2-3 times a week a get this error message in excel:
This stops the code and VBA will not start before I have pushed the "OK" button
Can I in any way disable this error or make a workaround? I have tried to make an error handler there jumped to the timer (I hoped it would wait 3 minuts again and try again) but it didn't work. i have tried the classic disable alerts - but no luck there either
This is my code:
Code:
Sub AutoSave()
Application.DisplayAlerts = False
Application.ErrorCheckingOptions.BackgroundChecking = False
Application.ErrorCheckingOptions.EvaluateToError = False
dTime = Time + TimeValue("00:03:00")
Application.CalculateFull
On Error GoTo Noconnection:
With Application
.OnTime dTime, "AutoSave"
.EnableEvents = False
.DisplayAlerts = False
ActiveWorkbook.Save
Application.StatusBar = "Gemmer " + CStr(Now)
.EnableEvents = True
End With
Noconnection:
End Sub