Running the macro quickly
It is tedious to repeatedly run the macro using Tools > Macros > Run Macro (see Figure 3). The macro can be run from the IDE. Use Tools > Macros > Organize Macros > OpenOffice.org Basic to open the Basic Macro dialog. Select your macro and click Edit to open the macro in the IDE.
The IDE has a Run Basic icon in the toolbar that runs the first macro in the IDE. Unless you change the first macro, it is the empty macro named Main. Modify Main so that it reads as shown in Listing 3.
Listing 3: Modify Main to call CopyNumToCol1.
Now, you can run CopyNumToCol1 by repeatedly clicking the Run Basic icon in the toolbar of the IDE. This is very fast and easy, especially for temporary macros that will be used a few times and then discarded.