Главная » Excel Macros For Dummies читать онлайн | страница 50

Читать книгу Excel Macros For Dummies онлайн

50 страница из 60

You can quickly switch among Code panes by pressing Ctrl+Tab. If you repeat that key combination, you keep cycling through all the open Code panes. Pressing Ctrl+Shift+Tab cycles through the panes in reverse order.

Minimizing a Code pane gets it out of the way. You can also click the pane's Close button in the title bar to close it completely. (Closing a window just hides it; you won't lose anything.) To open it again, just double-click the appropriate object in the Project Explorer. Working with these Code panes sounds more difficult than it really is.

Getting VBA code into a module

Before you can do anything meaningful, you must have some VBA code in the VBA module. You can get VBA code into a VBA module in three ways:

 Use the Excel macro recorder to record your actions and convert them to VBA code.

 Enter the code directly.

 Copy the code from one module and paste it into another.

ssss1 shows you how to create code by using the Excel macro recorder. However, not all tasks can be translated to VBA by recording a macro. You often have to enter your code directly into the module. Entering code directly basically means either typing the code yourself or copying and pasting code you have found somewhere else.

Правообладателям