ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Open workbook with unreadable content (https://www.excelbanter.com/excel-programming/427410-open-workbook-unreadable-content.html)

jacque

Open workbook with unreadable content
 
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!



All times are GMT +1. The time now is 08:06 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com