Get code from a corrupted workbook

  • Thread starter Thread starter Dave
  • Start date Start date
D

Dave

I've just had a file corrupt with a decent chunk of code inside. I've tried
Excel Recovery but it doesn't recover VBA

Is there any way to extract the code?

Thanks

Dave
 
Have you tried doing so with OpenOffice (Free 60MB download from www.openoffice.org)

If that's too big a download then by all means fire it on down to me and I'll give it a go for
you.

You need to take the NOSPAM bit out of my email address
 
Downloading - thanks for tip Ken


Ken Wright said:
Have you tried doing so with OpenOffice (Free 60MB download from www.openoffice.org)

If that's too big a download then by all means fire it on down to me and I'll give it a go for
you.

You need to take the NOSPAM bit out of my email address

--
Regards
Ken....................... Microsoft MVP - Excel
Sys Spec - Win XP Pro / XL2K & XLXP

-------------------------------------------------------------------------- --
Attitude - A little thing that makes a BIG difference
-------------------------------------------------------------------------- --
 
My pleasure - Hope it works out OK. You will use OpenOffice.calc to open the workbook, and when
it gets there, use Tools / Macro to open the Macro window. Click on any module name in your file
and hit Edit, and you should then have a horizontal row of tabs showing you all the modules in the
book (Same as Excel's tabbed worksheets)

The code may well all be Rem'd out, but you can fix that with an Edit / Replace right where you
are in .calc, or once you get it back into Excel.
 
Unfortunately the code is gone (???) but the file did open

Thanks for the tip, quite handy

Cheers

Dave
 
Which file did you open - The recovered one or the original corrupt one. OpenOffice is good at
opening corrupt Excel files as well, so give it a go with that.
 
I saw this go by on the PowerPoint newsgroup recently:

"John O wrote:
'Next time someone runs across a corrupted Ppt doc try this tool.
In Word, do File - Open and choose file type "recover text from
any document". This pulls out the text off slides, from speaker
notes, from everywhere. It won't be clean, but if you need this...'
I just tried it on some oddball files and it works really well.
Gotta give credit to Woody for the tip."

I tried this with a short bit of Excel VBA code, and I did see it in there,
sort of, all choppy and mixed with garbage, barely decipherable, but it
might work differently with different files, and you might just get enough
to remember what you did. Let us know.

Bruce Cooley


: I've just had a file corrupt with a decent chunk of code inside. I've
tried
: Excel Recovery but it doesn't recover VBA
:
: Is there any way to extract the code?
:
: Thanks
:
: Dave
:
:
 
I don't believe VBA saves your code as text. It's "tokenized", which explains the "garbage" that
are the binary codes for various operators, functions, etc. The legible text probably is your
procedure names and quoted text, etc.
 
Back
Top