How to detect / bypass the Workbook Recovery window and process

jjasmith4

New Member
Joined
Aug 22, 2018
Messages
48
I'm working with a Word/VBA system, and as it goes, it opens an XLSX to get some information from it. One of many users reported that nothing came from the XLSX, so I manually opened Excel to open the file which the code should have opened, just to prove it wasn't a permissions / access issue.

What happened was that, when I double-clicked the XLSX, Excel opened, and the Recovery window came up, the one that tells you about unsaved documents following an abnormal crash. No other user had that, so it worked fine for the rest. And once I dismissed all the recovered files, closed Excel, and re-ran my Word/VBA system, it worked.

So somehow the presence of unsaved stuff following a crash is what prevents VBA code from opening any workbook. How in VBA can I create a new Excel application object (OK, I can do that) and successfully open a workbook in it without that recovery stuff getting in its way?

Thanks in advance.
 

NdNoviceHlp

Well-known Member
Joined
Nov 9, 2002
Messages
2,673
You are welcome. I don't like messing with the registry but my system mechanic seems to think that the routine doesn't cause any harm. Have a nice day. Dave
 

Some videos you may like

Excel Facts

What do {} around a formula in the formula bar mean?
{Formula} means the formula was entered using Ctrl+Shift+Enter signifying an old-style array formula.

Watch MrExcel Video

Forum statistics

Threads
1,119,085
Messages
5,576,027
Members
412,694
Latest member
Deaf1Too
Top