How to kick out of a frozen save

Photomofo

Active Member
Joined
Aug 20, 2012
Messages
259
PXL_20231122_065757314.jpg


I have a program that periodically locks up when it's trying to save to a network location. Is there a way to start a 10 second timer before the save command followed by a cancel timer command after the save command? If the 10 seconds is reached you do a sendkey of the return key to cancel the save command and move on with the program. Does this exist? Can someone share an example?
 

Excel Facts

Who is Mr Spreadsheet?
Author John Walkenbach was Mr Spreadsheet until his retirement in June 2019.
I don't think this is achievable. You have to use Application.Wait function. However there are only two events that you can use this function.
BeforeSave: If you use Application.Wait in this event, the app will wait for 10 sec. and then start to saving process.
AfterSave: You have to wait for saving event to finish in order to trigger the Enter action.

In both situations, it is quite impossible to run something during the saving process. Maybe someone may come up with a clever solution.
 
Upvote 0
I don't think this is achievable. You have to use Application.Wait function. However there are only two events that you can use this function.
BeforeSave: If you use Application.Wait in this event, the app will wait for 10 sec. and then start to saving process.
AfterSave: You have to wait for saving event to finish in order to trigger the Enter action.

In both situations, it is quite impossible to run something during the saving process. Maybe someone may come up with a clever solution.
OK thanks... I thought there might be some sort of kickout command but if this isn't the case I'll see if I can use some logic around verifying the path first. It's not like the path isn't there because this save works 99% of the time.

Sure seems like there should be a built in function where there's a maximum time limit for how long the save should take.
 
Upvote 0
An alternative save may be another option according to this thread.


ThisWorkbook.Activate
SendKeys "^s"
DoEvents
ThisWorkbook.Close
 
Upvote 0

Forum statistics

Threads
1,215,330
Messages
6,124,310
Members
449,152
Latest member
PressEscape

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