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,670
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

When they said...
When they said you are going to "Excel at life", they meant you "will be doing Excel your whole life".

Watch MrExcel Video

Forum statistics

Threads
1,118,814
Messages
5,574,488
Members
412,597
Latest member
Timtec
Top