Disable Network error?

zjat

New Member
Joined
Aug 4, 2009
Messages
18
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:
fejla.jpg

This stops the code and VBA will not start before I have pushed the "OK" button :mad:

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 :confused:

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
 

Excel Facts

Quick Sum
Select a range of cells. The total appears in bottom right of Excel screen. Right-click total to add Max, Min, Count, Average.
Do you have the error number?

in the error handler type

Code:
End With
Exit sub

Noconnection:
     [B]msgbox err.number & " " err.description[/B]
End Sub

It will return the error number and description as to why it is failing. Good place to start... :)
 
Upvote 0

Forum statistics

Threads
1,214,923
Messages
6,122,286
Members
449,076
Latest member
kenyanscott

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top