How to inspect / view an Excel macro before "enabling macros" for a sheet?

You can have a look at all macros in a document by using the Developer tab in Word to give you easy access to the Visual Basic routines embedded in the document.

First you need to make sure that the Developer Tab is enabled. Go to File -> Options then:

developer tab

On the Developer Tab that should now appear there should now be a "Visual Basic" button which you can click to get to the Visual Basic editor.

Browsing through the document tree on the left of the editor you should be able see all the code and modules that are embedded in the document without first needing to enable macros.

I tend to do this with documents I do not trust.

Note: I've done this in Word, the same feature is available in Excel and the option to enable it is in the same place.


In all versions of all Office applications since 2003, and possibly earlier, Alt+F11 will open the VBA Editor. There is no need to enable the 'Developer' tab in the Ribbon for Office 2007 and newer for this to work.