Building Interactive VBA Programs

Some macros work by themselves, with no user intervention required. The ItalicizeFirstWord macro, which you recorded in the previous chapter, falls into the "no hands required" category. It runs from start to finish and, except for starting it, the user doesn't have to do a thing. In fact, all recorded macros run without any user intervention, because the recorder doesn't have the intelligence necessary to know when to pause for user input when it's required.

More powerful macros interact with the outside world—for example, a macro might stop and let you select a file from a browse box, or display a message and wait for you to click OK. You can also set up timers to let a macro pause for a predetermined amount ...

Get Special Edition Using Microsoft® Office XP 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.