Читать книгу Excel Macros For Dummies онлайн
35 страница из 60
All macros need an event to start them running. Earlier in this chapter, I discussed assigning a shortcut key to a macro you record. Pressing the shortcut key is one type of event that can trigger a macro. In this section, I discuss the Personal Macro Workbook, a special workbook for storing macros, and a few common ways to trigger macros.
Storing macros in your Personal Macro Workbook
Most user-created macros are designed for use in a specific workbook, but you may want to use some macros in all your work. You can store these general-purpose macros in the Personal Macro Workbook so that they’re always available to you This file, named personal.xlsb, doesn't exist until you record a macro using Personal Macro Workbook as the destination. The Personal Macro Workbook is loaded whenever you start Excel.
To record the macro in your Personal Macro Workbook, select the Personal Macro Workbook option in the Record Macro dialog box before you start recording. This option is in the Store Macro In drop-down list (refer to Figure 1-1).