Chapter 27. Recording Macros

Configuring Macro Security

Using the Macro Recorder

Introducing the Visual Basic Editor

Learning the Basics of Visual Basic

Adding Code to or Editing Recorded Macros

Using Subroutines in Macros

Using the Personal Macro Workbook

Going On from Here

A MACRO is a set of instructions that tells Microsoft Excel 2010 (or another application) to perform one or more actions for you. Macros in Excel 2010 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 can 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 use 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.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset