How to detect / bypass the Workbook Recovery window and process

jjasmith4

Board Regular
Joined
Aug 22, 2018
Messages
59
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.
 
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
 
Upvote 0

Excel Facts

When did Power Query debut in Excel?
Although it was an add-in in Excel 2010 & Excel 2013, Power Query became a part of Excel in 2016, in Data, Get & Transform Data.

Forum statistics

Threads
1,223,264
Messages
6,171,081
Members
452,377
Latest member
bradfordsam

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