SEARCH
0-9 A B C D E F G H I J K L M N O P Q R S T U V W X Y Z
Prev | Current Page 28 | Next

Jim DeMarco

"Pro Excel 2007 VBA"


CHAPTER 1 n THE MACRO RECORDER AND CODE MODULES 13
Type: Lists the expression type.
Context: Lists the context of the watch expression.
You can close the window by clicking the Close box. If the Close box is not visible, doubleclick
the Title bar to make the Close box visible, and then click it.
Recording a Macro
In an Excel workbook, open the Developer ribbon and choose the Record Macro command
to display the Record Macro dialog box, shown in Figure 1-18. The Record Macro dialog will
display. The dialog box shows the default macro name, allows you to assign a shortcut key,
lets you choose where to store the macro, and provides a text field where you can enter text
describing the macro??™s function.
By default, Excel 2007 stores macros in the current workbook. If you want your macros
to be available to any workbook, you can choose Personal Macro Workbook from the ???Store
macro in??? drop-down list.
Figure 1-18. The Record Macro dialog box
1. In the Macro name text box, enter a name for your macro: MyMacro.
2. Add a shortcut key if you like.
3. From the ???Store macro in??? drop-down, choose This Workbook.
4. Add descriptive text if you like.
5. Click OK.
6. Enter the data shown in Figure 1-19.
CHAPTER 1 n THE MACRO RECORDER AND CODE MODULES 14
Figure 1-19. Recording data entry
7. Choose the Stop Recording command from the Developer ribbon.
Let??™s take a look at the code Excel 2007 created for us. To open the Visual Basic Editor
(VBE), choose the Visual Basic command from the Developer ribbon or use the Alt+F11 shortcut
key combination.


Pages:
16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40