ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Workbook which having unreadable contents is not getting opened (https://www.excelbanter.com/excel-programming/428979-workbook-having-unreadable-contents-not-getting-opened.html)

Ravindra SYSTIME

Workbook which having unreadable contents is not getting opened
 
Some of the workbooks always has an error message when it's opened manually
that says


"Excel found unreadable content in "filename". Do you want to recover the
contents of this workbook? If you trust the source of this workbook,ckick
Yes."

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'class failed".

Please help me out,it is very urgent

Thanks in Advance

OssieMac

Workbook which having unreadable contents is not getting opened
 
Hello Ravindra,

What version of xl are you using?

When opened manually, after the initial unreadable content message, when the
workbook does open, does it tell you if anything was deleted or anything else
to provide a clue as to what might have occurred? If so, post the exact
message.

If you open the workbook manually and save it.
Make an alteration and re-save it.
Close the workbook.
Re-open the workbook.
Do you still get the error message?
I ask the above because sometimes code which is updating the workbook can be
the problem. An example is when using code to sort; if it is missing the line
to clear the sort fields before applying the sort then it can occur.

Can you post the code you are using to open the workbook?

--
Regards,

OssieMac


"Ravindra SYSTIME" wrote:

Some of the workbooks always has an error message when it's opened manually
that says


"Excel found unreadable content in "filename". Do you want to recover the
contents of this workbook? If you trust the source of this workbook,ckick
Yes."

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'class failed".

Please help me out,it is very urgent

Thanks in Advance



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

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