Recording and editing Quattro Pro macros

With Quattro Pro, you can record actions as you perform them. Recording converts actions into macro commands and stores them as labels in a block. Quattro Pro does not record actions keystroke by keystroke. Instead, it translates keystrokes and mouse actions that invoke menu choices into one or more macro commands called command equivalents. This recording method is called logical recording. Macros recorded in this way are more efficient and can run with a customized Quattro Pro menu system. For example, a macro containing commands to print the active notebook runs even when the menu command is not in the active menu bar.

You can also type Quattro Pro macros if you prefer to enter the macro manually. You can type multiple macro commands in the same cell or type each separately in multiple cells. Macro commands are labels, therefore, Quattro Pro does not recognize a syntax error as you type it in; the error occurs only when you try to run the macro. Even a typing error can prevent a macro from running. To save debugging time, pay careful attention to the format of macro commands as you enter them, and record macros whenever possible. For information about macro syntax, see “Understanding Quattro Pro macro syntax.”

You can also add a command to a macro script.

Quattro Pro lets you name the macros you record. Cell names make macros more readable and easier to remember. Give names to macros that reflect the tasks they perform. For example, PERCENT could be the name of a macro that changes the numeric format of the current cell to a percentage.

When naming macros, avoid names that are the same as macro command names; otherwise the macro commands are invalid. For example, suppose you name a macro READLN; this is also the name of a predefined macro command for reading a line from a file. If you try to use this command to read a line into cell A6 rather than {READLN A6}, Quattro Pro assumes you are playing the READLN macro rather than the {READLN} command.


To record a Quattro Pro macro

Wordperfect Quattro Pro btnbacktotopproc Recording and editing Quattro Pro macros
1.
 
Click Tools Wordperfect Quattro Pro onestep Recording and editing Quattro Pro macros Macro Wordperfect Quattro Pro onestep Recording and editing Quattro Pro macros Record.
2.
 
Enable the Quattro Pro macro option.
If you want to save the macro in an existing macro library, on the status bar, click the notebook name that contains the macro library.
3.
 
Select the cells in which to store the macro.
4.
 
Click OK.
5.
 
Perform the actions in the macro.
6.
 
Click Tools Wordperfect Quattro Pro onestep Recording and editing Quattro Pro macros Macro Wordperfect Quattro Pro onestep Recording and editing Quattro Pro macros Record.

Wordperfect Quattro Pro note Recording and editing Quattro Pro macros

 
You can store a macro on the spreadsheet where you perform the macro or on a spreadsheet specifically assigned to the macro.
 
At the end of the macro, leave a line blank so the macro terminates without user intervention. Otherwise, the macro interprets labels below it as macro commands.
 
The recording of a macro is noted by Wordperfect Quattro Pro record Recording and editing Quattro Pro macros on the Application Bar.
 
For more information about saving a macro in an existing macro library see “Working with macro libraries.”
 
When you select cells to store the macro in, select a single cell if there is no chance of overwriting data in the cells below (Quattro Pro fills the cells below as necessary). When you select more than one cell, the macro is confined only to those cells, and stops recording when they are full.

To pause or resume the recording of a Quattro Pro macro

Wordperfect Quattro Pro btnbacktotopproc Recording and editing Quattro Pro macros
 
Click Tools Wordperfect Quattro Pro onestep Recording and editing Quattro Pro macros Macro Wordperfect Quattro Pro onestep Recording and editing Quattro Pro macros Pause.

To type a Quattro Pro macro

Wordperfect Quattro Pro btnbacktotopproc Recording and editing Quattro Pro macros
1.
 
Click in the first cell where you want to store the macro.
2.
 
Type the macro commands you want.
3.
 
Type {QUIT}.

Wordperfect Quattro Pro note Recording and editing Quattro Pro macros

 
When you type commands in more than one cell, be sure the entries proceed downward (A1, A2, A3) with no empty cells between them. Each cell must contain a label or a text formula.

Wordperfect Quattro Pro tip Recording and editing Quattro Pro macros

 
You can also indicate the end of a macro by typing {RETURN} or leaving an empty cell below the last cell of the macro.

To add a command to a macro script

Wordperfect Quattro Pro btnbacktotopproc Recording and editing Quattro Pro macros
1.
 
Click a spreadsheet containing the macro script.
2.
 
Click the cell above where you want to add the command.
3.
 
Click Insert Wordperfect Quattro Pro onestep Recording and editing Quattro Pro macros Insert row.
4.
 
Click OK.
5.
 
Type the new command.

To delete a command from a macro script

Wordperfect Quattro Pro btnbacktotopproc Recording and editing Quattro Pro macros
1.
 
Click a spreadsheet containing the macro script.
2.
 
Click the row label containing the command you want to delete.
3.
 
Click Edit Wordperfect Quattro Pro onestep Recording and editing Quattro Pro macros Delete cells.

To name a Quattro Pro macro

Wordperfect Quattro Pro btnbacktotopproc Recording and editing Quattro Pro macros
1.
 
Click a spreadsheet containing the macro script.
2.
 
Select the cells containing the macro you want to name.
3.
 
Click Insert Wordperfect Quattro Pro onestep Recording and editing Quattro Pro macros Name Wordperfect Quattro Pro onestep Recording and editing Quattro Pro macros Name cells.
4.
 
Type the name in the Name box.

Recording and editing Quattro Pro macros