Chapter 26: Recording Macros


Overview

A macro is a set of instructions telling Microsoft Office Excel 2007 (or another application) to perform one or more actions for you. Macros in Office Excel 2007 are like computer programs, but they run completely within Excel. You can use them to automate tedious or frequently repeated tasks.

Macros can carry out sequences of actions much more quickly than you could yourself. For example, you can create a macro that enters a series of dates across one row of a worksheet, centers the date in each cell, and then applies a border format to the row. Or you can create a macro that defines a combination of print settings-margins, orientation, scaling, headers, and footers-that you want to be able to reuse easily in many documents. Macros are great for any task you do repeatedly.

You can create a macro in two ways: You can record it, or you can build it by typing instructions in a module. Either way, your instructions are encoded in the programming language Microsoft Visual Basic for Applications (VBA). (You can also combine the two approaches.)

Even if you're not a programmer and have no intention of becoming one, macros can be a useful addition to your Excel toolkit. Thanks to the macro recorder, you don't have to understand all the ins and outs of VBA to create effective and timesaving macros. And if you're curious about VBA and want to learn to do more with macros than is possible with the recorder alone, you will find the recorder to be an excellent learning tool. You can get a great start on acquiring VBA expertise by examining the code that the recorder generates.



Microsoft Office Excel 2007 Inside Out
MicrosoftВ® Office ExcelВ® 2007 Inside Out (Inside Out (Microsoft))
ISBN: 073562321X
EAN: 2147483647
Year: 2004
Pages: 260

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net