By default, all macro activity is disabled.
To temporarily set the security level to enable all macros, do the following:
1. On the Developer ribbon, in the Code group, click Macro Security, as shown in
Figure 1-1.
Figure 1-1. Code options on the Developer ribbon
2. If the Developer tab is not available, do the following to display it:
a. Click the Microsoft Office button (shown in the following image).
b. Click Excel Options.
c. In the Popular category, under ???Top options for working with Excel,??? select the
???Show Developer tab in the Ribbon??? check box, and then click OK.
3. Under Macro Settings, click ???Enable all macros (not recommended, potentially dangerous
code can run),??? and then click OK, as shown in Figure 1-2.
CHAPTER 1 n THE MACRO RECORDER AND CODE MODULES 3
nWarning To help prevent potentially dangerous code from running, it is recommended that you return to
any of the settings that disable all macros after you finish working with macros.
Once this is done, you can record your macro.
Figure 1-2. Excel Trust CenterMacro Settings options
The Visual Basic Development Environment
Open the Developer ribbon and choose Visual Basic to display the Visual Basic Editor (VBE).
Figure 1-3 shows the VBE.
CHAPTER 1 n THE MACRO RECORDER AND CODE MODULES 4
Figure 1-3. Excel??™s Visual Basic Editor
The default view is divided into three panes: the Project Explorer, the Property Sheet, and
the code window.
The Project Explorer (Figure 1-4) lists open projects (workbooks) and the objects they
contain.
Pages:
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34