Datasheet
Book IX
Chapter 1
Recording and
Using Macros
Simple Macro Edits That Don’t Require a Ph.D. in VBA
565
Simple Macro Edits That Don’t Require a Ph.D. in VBA
Before you make massive changes to a macro, you need a pretty good knowl-
edge of VBA. However, you can make certain types of changes without know-
ing much about VBA at all. Here’s a sampling:
✦ Correct spelling errors. If you inserted text into a document and mis-
spelled it, don’t hesitate to edit the macro to correct the misspellings.
Text you insert into a document while recording a macro is included in a
Selection.TypeText command, like this:
Selection.TypeText Text:=”This is some simple text.”
You can correct any spelling mistakes or change the inserted text alto-
gether, provided you take care not to remove either of the quotation
marks that appear before and after the text. For example, you can cor-
rect the preceding line to:
Selection.TypeText Text:=”This is some sample text.”
Figure 1-4:
Editing a
macro.
50_040584 bk09ch01.qxp 12/28/06 9:28 PM Page 565