Saving problem

CDirk

New Member
Joined
Sep 15, 2023
Messages
4
Office Version
  1. 2016
Platform
  1. Windows
I have an excel application that runs 24/24. During the day, there is a cycle that is run every 10 minutes. After that cycle, it is saved with the save command. For several weeks now, when saving, we have been getting a message on the screen every now and then saying that the file does not exist or has been moved. This message obviously blocks the operation of the cycles. I've already tried turning off Application.DisplayAlerts before saving, but that doesn't help.

Current code for saving:

VBA Code:
  Application.DisplayAlerts = False
  If Dir(Wb.FullName) <> "" Then
    Wb.Save
  End If
  Application.DisplayAlerts = True

Anyone have any idea why we are getting this notification?
 

Excel Facts

Excel Joke
Why can't spreadsheets drive cars? They crash too often!
Try adding an ON ERROR RESUME NEXT before the save and an ON ERROR GOTO 0 after to disable it. Disabling the alert (which is good!) isn't the same as ignoring the error.

Are you writing the results to a log file? You should! ;)
 
Upvote 0
Try adding an ON ERROR RESUME NEXT before the save and an ON ERROR GOTO 0 after to disable it. Disabling the alert (which is good!) isn't the same as ignoring the error.

Are you writing the results to a log file? You should! ;)
Modified my code as specified. Problem persists. Only after clicking away the message does the code pass the error routine.......
 
Upvote 0
Ho hum. Trying using SaveAs and try overwriting the file each time?
 
Upvote 0
Solution
This tip seems to work..... I have encountered the error once without blocking the application.
I'll follow it up for a while. The error doesn't happen daily now either.

Ho hum. Trying using SaveAs and try overwriting the file each time?
This tip seems to work..... I have encountered the error once without blocking the application.
I'll follow it up for a while. The error doesn't happen daily now either.
 
Upvote 0

Forum statistics

Threads
1,224,813
Messages
6,181,118
Members
453,021
Latest member
Justyna P

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