Recording Dialog Boxes and “With” Statements

The macro recording examples you've seen so far have been pretty simple, and the macro recorder has done a reasonably good job of capturing the actions recorded. When you record a macro that uses a built-in dialog box, however, you might find that you're in for a surprise. As you'll see in the example that follows, you might get a lot more VBA code than you're interested in.

Of course, using dialog boxes while you record is very convenient. By choosing one command, you can choose many preferences or options at a time. Also, in some cases there aren't any toolbar buttons or keyboard shortcuts for the features you want to record.

Suppose you need a macro to emphasize selected text by changing the font ...

Get Special Edition Using Microsoft® Word 2000 now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.