Workbook which having unreadable contents is not getting opened

R

Ravindra SYSTIME

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
 
O

OssieMac

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?
 

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