How to View VBA Code in Excel 2007

By Stephanie Ellen

Visual Basic for Applications (VBA) is a subset of the programming language Visual Basic (VB). VBA is specifically designed for ease of use within Microsoft Office applications like Microsoft Excel. A Visual Basic Editor (VBE) is built into each workbook and allows you to write, modify, and save VBA code within a workbook. If you want to view VBA code in Excel 2007, then you must first open the VBE.

Step 1

Open the workbook in Excel that you would like to view VBA code for. VBA code is workbook specific, meaning it is only attached to one workbook. In order to view the code for a specific workbook, you must have that workbook open.

Step 2

Click on the "Developer" tab, then click on "View Code."

Step 3

Click on a module in the left sidebar. This will open the module and display the VBA in a box on the right side of your screen.

Tips & Warnings

  • You can also press "Alt" and "F11" on your keyboard to open the VBE.