Open workbook with unreadable content

J

Jacque

I have a macro that loops thorugh a bunch of workbooks, opens them, copies
data in them, and pastes that data in the workbook I'm working in. One of
the workbooks always has an error message when it's opened manually that says
"Excel found unreadable content... do you want to recover..." and when I
click "Yes" the workbook opens just fine. However, when I try to open it
with VBA, I get an error message saying "Method 'Open' of objects 'Workbooks'
failed".

I've already tried disabling the display alerts. Right now my code to open
the workbook reads:

Application.DisplayAlerts = False
Workbooks.Open Filename:=update_file_location
Application.DisplayAlerts = True

Any ideas to fix this problem? I appreciate the help!
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top