Macro to pick up the last autorecovered file and rename it with the original file name

Jirka79

New Member
Joined
Dec 9, 2020
Messages
32
Office Version
  1. 2010
Platform
  1. Windows
Hi all,

Unfortunately, in my work, we are experiencing quite often some excel crushes (electricity cuts, etc...) and then, the operators restart the pc and reopen the Excel file where they introduce the production data and they are struggling everytime that it happens because they don't know which recovered file they need to pick up.... and besides, when they pick up one of the recovered files, they keep working with the production file but under the name of the recovery file (for example file name "XXXX (version 2).xlsb (autosaved)" and then I'm the one struggling because then other macros I have they don't work properly when the file name is not the original one, with the extension .xlsm.

So, my idea was to create a button for the operators with a macro that automatically takes the last recovered file and renames the file to the normal file name (the original file name with .xlsm).

I've been surfing the net but I don't find such a thing... So, please, is there a code that could do what I'm looking for?

Thank you all in advance for your kind attention!
 

Excel Facts

How can you automate Excel?
Press Alt+F11 from Windows Excel to open the Visual Basic for Applications (VBA) editor.
Cross-posting (posting the same question in more than one forum) is not against our rules, but the method of doing so is covered by #13 of the Forum Rules.

Be sure to follow & read the link at the end of the rule too!

Cross posted at: Macro to pick up the last autorecovered file and rename it with the original file name
There is no need to repeat the link(s) provided above but if you have posted the question at other places, please provide links to those as well.

If you do cross-post in the future and also provide links, then there shouldn’t be a problem.
 
Upvote 0

Forum statistics

Threads
1,223,214
Messages
6,170,775
Members
452,353
Latest member
strainu

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