totn Excel 2007 VBA Environment

MS Excel 2007: Code Window in VBA Environment

This Excel tutorial explains the Code window in the VBA environment in Excel 2007 (with screenshots and step-by-step instructions).

Code Window

The Microsoft Visual Basic window displays your VBA environment in Excel 2007:

Microsoft Excel

Next, let's analyze the Code window in the VBA environment. The Code window is usually found to the right of the Project Explorer in Excel 2007. It displays the VBA code for the object currently highlighted in the Project Explorer.

Microsoft Excel

In the example above, it is displaying the VBA code for the module called Module1.

If the Code window is not visible when you open the Microsoft Visual Basic window, you can make it visible by selecting Code under the View menu.

Microsoft Excel