The Macro Recorder

Earlier in this chapter, I discuss the macro recorder, which is a tool that converts your Excel actions into VBA code. This section covers the macro recorder in more detail.

Excel's Visual Basic toolbar has several useful buttons for you.On this toolbar, you'll find the Run Macro, Record Macro, Stop Macro, and Visual Basic Editor buttons useful.

The macro recorder is an extremely useful tool, but it's important to remember the following points:

♦ The macro recorder is appropriate only for simple macros or for recording a small part of a more complex macro.

♦ The macro recorder cannot generate code that performs looping (that is, repeating statements), assigns variables, executes statements conditionally, displays dialog boxes, and so on.

♦ The code that is generated depends on certain settings that you specify.

♦ You'll often want to clean up the recorded code to remove extraneous commands.

Was this article helpful?

0 0

Post a comment