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

Waterfall charts in Excel?
Office 365 customers have access to Waterfall charts since late 2016. They were added to Excel 2019.

DauntingGecko

Well-known Member
Joined
Feb 2, 2006
Messages
521
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... :)
 
Master Excel Bundle

Excel contains over 450 functions, with more added every year. That’s a huge number, so where should you start? Right here with this bundle.

Forum statistics

Threads
1,164,147
Messages
5,835,669
Members
430,373
Latest member
swartzfeger

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
Top