Page 182 - Excel Data Analysis
P. 182
10 537547 Ch09.qxd 3/4/03 12:13 PM Page 168
EXCEL DATA ANALYSIS
ACTIVATE THE VISUAL BASIC EDITOR
ith the Visual Basic Editor, you can create and Project Explorer highlights the corresponding module in the
modify Excel macros using Visual Basic for tree, and the VBA code for the macro displays in the Code
W Applications, or VBA. Using the Visual Basic Editor, window. When you select the Visual Basic Editor directly,
you can create more complex macros for analyzing data however, the Project Explorer highlights the name of the
within Excel. You can run the Visual Basic Editor only from a current project, which is the name of the workbook open in
Microsoft Office application. You can activate the Visual Excel. The Visual Basic Editor refers to each entry in the
Basic Editor by editing a macro that you recorded with the Project Explorer as a node. The top nodes, which are
Macro Recorder, or you can open the editor directly from displayed in bold, represent the Excel VBA projects
the Tools menu by clicking the Visual Basic Editor option. currently open. You can select a specific module in a
Whether you create a macro using the Macro Recorder or in project by double-clicking the module node in the Project
the Visual Basic Editor, you write all source code using VBA. Explorer.
Of course, with the Macro Recorder, Excel takes the Keep in mind that if the Personal Macro Workbook,
keystrokes that you record and converts them to VBA.
Personal.xls, contains macros, the project for the
When you open the Visual Basic Editor, the Project Explorer, Personal.xls project always opens when you access the
if displayed, indicates your location within the project. If Visual Basic Editor. Although the Personal Macro Workbook
you open an existing macro from the Macro dialog box, the is hidden within Excel, in the Visual Basic Editor you can
view and modify all its macros.
ACTIVATE THE VISUAL BASIC EDITOR
OPEN THE VBE USING ■ The Visual Basic Editor
THE TOOLS MENU
opens with the window
⁄ Click Tools ➪ Macro ➪ layout that you last used.
Visual Basic Editor.
168