University of Greenwich Business School
Microsoft Excel 2007: Macros and VBA
Author: Martin Green
Microsoft Excel 2007 – Macros and VBA
With the introduction of Excel 2007 Microsoft made a number of changes to the way macros and
VBA are approached. This document outlines these special features of Excel 2007 for people
wanting to create macros and work with VBA and for those migrating to Excel 2007 from an earlier
version of Excel.
The Developer Tab
If you plan to work a lot with macros and VBA you might find it convenient to switch on the
Developer tab. This is not included in the collection of tabs normally displayed in the Ribbon. It
gives quick access to many useful tools so if you are planning to work with macros and VBA you
should switch it on. Click the Office Button then click the Excel Options button at the bottom of
the window to open the Excel Options dialog. In the Popular section check the box marked Show
Developer tab in the Ribbon (Fig. 1) then click the OK button.
Fig. 1 Switch on the Developer Tab from Excel Options.
This displays the Developer tab in the ribbon. The tools on the Developer tab are arranged in four
groups: Code, Controls, XML and Modify (Fig. 2).
Fig. 2 The Developer Tab in Excel.
The Code group contains the tools most commonly used when recording and running macros and
also gives quick access to the Visual Basic Editor. The Controls group contains tools for working
with ActiveX and Form controls on a worksheet. The XML group contains all the functionality
related to working with XML files in Excel. The Modify group allows you to specify the type of
Document Information Panel the current workbook should display in other compatible programs.
Each button on the ribbon displays a comprehensive tooltip describing its function.
It is not necessary to display the Developer tab in order to simply record and run macros. When
the View tab is selected the ribbon displays a Macros group which also gives access to the required
tools (Fig. 3).