Martin KS
Martin KS

Reputation: 521

Retreiving/reading excel macro without opening excel?

I wrote an excel macro that seems to have broken, unfortunately when I try to edit the macro in the VBA editor, excel itself crashes spectacularly. This seems to happen whether I open the VBA Editor before or after loading the problematic excel file.

Does anyone know of a way of viewing the VBA code that I've written without using excel to get there? Alternatively, can anyone get to the VBA code in (this excel file)(Link Removed) without it crashing their excel?

Unlike "Running Macros without opening excel" I don't need to be able to run the broken code without excel - just copy and paste it somewhere to fix it!

Upvotes: 4

Views: 11403

Answers (2)

robotik
robotik

Reputation: 2007

For anyone who is looking for the answer for the same question let me translate what the accepted answer means.

@R3uK provided the following link to Tools to extract VBA Macro source code from MS Office Documents: decalage.info/vba_tools

there are several tools there to extract code from Office documents, for most of them you have to first unzip the document itself. (newer Office documents are a collection of files in a zipped folder with a docx or xlsx extension.) you have to rename the document to filename.zip and copy the contents to a folder, then run the tool to get the macro source code.

Upvotes: 0

A.S.H
A.S.H

Reputation: 29332

I created a fresh new excel file and open the VBA editor. Then I opened the one you provided, but I had put it in a non-secure folder. Excel prompted me the choice of opening it with macros disabled. I did, and I could see the code in the editor. :)

Upvotes: 1

Related Questions