Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I've got an Excel file (supplied by someone else) that opens with the message

 This file contains Visual Basic macros.

I'd like to look at the macros within the file - they contain code that I would like to be able to see. Once I've opened the file and allowed the macros, can I then read the Visual Basic code they contain?

I have tried looking under Tools > Macros, but I can't see any macros there, so perhaps they are hidden to me.

share|improve this question

2 Answers 2

up vote 2 down vote accepted

Press Alt+F11 to open the VBA editor window. There you can browse for any modules that contain VBA code.

enter image description here

enter image description here

share|improve this answer

Check the 'Microsoft Developer Network' (MSDN) help files to Show the Developer Tab on the Ribbon.

Then click the left-most icon on the Developer Tap to bring up the VBA editor window.
(Also possible with Alt+F11)

This method works for Excel Versions 2007 and 2010.


For Excel 2003 (which seems to be your version, if you talk about Tools > Macros)...

On the Tools menu, point to Macro, and then click Visual Basic Editor to bring up the same window as above.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.