{ } does nothing; use it to reserve space or insert blank lines in the macro without stopping it. Corel Quattro Pro continues running the macro command following { }.
See { ; } and {STEPON} for examples.
Related topics
{;}
Syntax
{;String}
Description
{ ; } lets you add explanatory remarks or comments to a macro. When Corel Quattro Pro encounters this macro command, it skips over it.
{ ; } is a convenient way to temporarily hide other macro commands, such as a branch to an incomplete macro.
Example
This example runs the _int_update subroutine, which calculates interest to date, then branches to the_print_inv subroutine to print the invoice. Notice how the comments embedded in the macro help make it easier to follow.
{; calculate interest to date}
{_int_update}
{ }
{; print the invoice}
{BRANCH _print_inv}
Parameters
Parameter Description
String numbers or letters up to 1020
Related topics
{ ? }
Description
{ ? } pauses macro execution and lets macro users press function keys, access menus, and choose commands until Enter is pressed. At that point the macro resumes execution.
Since this command gives users complete program control, use it with caution.
You must append a {CR} or ~ command after the { ? } to complete any user entry that requires Enter. For example, if the macro { ? } was used, and the user typed 67 then pressed Enter, the value would remain on the input line at the top of the application window even though the macro resumes. {CR} or ~ (or pressing Enter again) would then enter 67 into the cell.
Example
This macro selects cell E15, enters the label Check Number? in the cell to act as a prompt, then passes control to the keyboard so the user can enter a check number. The information the user enters replaces the Check Number? prompt.
{EditGoto E15}
{PUTCELL "Check Number?"}
{?}~
Related topics
{ABS}
Syntax
{ABS <Number>}
Description
{ABS} is equivalent to the Abs key, F4. The {ABS} macro converts relative cell addresses to absolute addresses. Number provides control over what part of the formula converts to an absolute address. {ABS 1} is equivalent to pressing F4 one time with the cell address selected; {ABS 2} is equivalent to pressing F4 twice, and so on, up to 8. If Number is missing, {ABS 1} is assumed.
{ABS} is most commonly used to create absolute addresses, which are handy for referencing a constant value that appears in only one place in a notebook but is copied in several formulas. The advantage of using absolute addresses is that formulas do not have to be edited if the absolute addresses are created before the formula is copied.
Tips
¿ Include the {EDIT} command before {ABS} to make sure Edit mode is active.
Example
The following example converts the formula in the active cell with a relative cell address to an absolute cell address. Then it copies the formula to a new location five cells below and five cells to the right of the active cell.
\A {EDIT}{ABS}~
{BlockCopy C(0)R(0),C(5)R(5)}
Parameters
Parameter Description
Number 1 through 8; 1 = pressing F4 once, 2 = pressing F4 twice, and so on (optional)
Related topics
{ACTIVATE}
Syntax
{ACTIVATE WindowName}
You can find the name of a window on its title bar.
Description
{ACTIVATE} makes the window specified by the string WindowName active.
Example
To make the named chart PROFITS (in the notebook REPORT.WB3) active, use
{ACTIVATE "C:\SALES\REPORT.WB3:PROFITS"}
Use the same syntax for activating dialog windows. To make the notebook itself active, use
{ACTIVATE "C:\SALES\REPORT.WB3"}
Parameters
Parameter Description
WindowName name of the window to make active
Related topics
{ADDMENU}
Syntax
{ADDMENU MenuPath, MenuBlk}
Description
{ADDMENU} lets you add menus to the active menu system. (Use {ADDMENUITEM} to add individual menu items to the active menu system.) MenuPath is a string that specifies where the new menu should appear. For example, to insert a menu before the Edit menu, use /Edit; to insert a menu before the Copy command on the Edit menu, use /Edit/Copy. You can use <- and -> to place a menu at the top or before the bottom of a menu, respectively. For example, /File/<- specifies the first item on the File menu.
You can also use numbers to identify menu items. For example, /File/0 specifies the first item on the File menu (the ID numbers start at zero). When identifying a menu item with numbers, divider lines are considered menu items (for example, /File/5 specifies the first divider line on the File menu, not Properties).
MenuBlk includes the cells containing a menu definition. MenuBlk must include all cells in the new menu.
Tips
¿ You can only add new menus to the menu bar on either side of the Edit and Tools menus--that is, one position to the left or right of the Edit menu and one position to the left or right of the Tools menu. The area between these menu positions is reserved for menus that change depending on the active window. Likewise, you cannot delete menus within this menu, either. You can add menu items to menus between the Edit and Tools menus, but the new menu items will be swapped out of the menu when the context changes.
¿ Changes made to the menu system using this command are not saved; they are lost when you exit Corel Quattro Pro. Each time you run a macro containing {ADDMENU}, the menu changes appear again.
¿ To restore the original menu bar, use the macro command {SETMENUBAR} without an argument.
Parameters
Parameter Description
MenuPath location in the menu system to insert a new menu
MenuBlk location in the menu system to insert a new menu
{ADDMENUITEM} is like {ADDMENU}, but inserts a single menu item before MenuPath instead of a new menu.
See the description of {ADDMENU} for the syntax of MenuPath. Name is the name of the new menu item; if a command, precede its underlined letter with an ampersand (&).
Link specifies the actions the menu item performs (for example, "MACRO _remove_file" runs the macro _remove_file).
Tips
¿ You can add menu items to any menu, but if you change a context-sensitive menu (all menus between Edit and Tools on the menu bar), the change only applies to the menu in the active window. For example, suppose you use a macro to change the View menu when the notebook window is active. If you then open a chart window, the chart View menu appears--without the change. If you want the change to apply to that View menu as well, you must run the macro again.
¿ Changes made to the menu system using this command are not saved; they are lost when you exit Corel Quattro Pro. Each time you run a macro containing {ADDMENUITEM}, the menu changes appear again.
¿ To restore the original menu bar, use the macro command {SETMENUBAR} without an argument.
Example
The following macro adds the menu item Find Object above Edit Go To. Find Object runs a macro command called _FINDOBJ.
{ADDMENUITEM "/Edit/Go To","Find Object", "MACRO _FINDOBJ", "Finds a floating object on the notebook sheet", "Ctrl+Shift+F", "No, Yes, No, No, No, No", "No"}
Parameters
Parameter Description
MenuPath location in the menu system to insert a new menu item; enter the sequence of menu items separated by forward slashes (/); you can use <- and -> to place a menu at the top or before the bottom of a menu, respectively. For example, /File/<- specifies the first item on the File menu. You can also use numbers to identify menu items. For example, /File/0 specifies the first item on the File menu (the ID numbers start at zero).
Name name of the command to add; if you want a letter of the name to appear underlined, precede it with an ampersand (&); to add a divider line, type a series of hyphens (-).
Link action to perform when the command is chosen (optional); this argument can specify a link command or a macro command to run when the menu item is chosen; click here for details.
Hint help text to display in a popup window when the command is highlighted (optional)
HotKey shortcut key that chooses the command (optional); separate key combinations with a plus sign (+), for example, Alt+F4.
DependString areas in which the command is available (optional); enter Yes or No for each area, separated by commas, in the following order: desktop, notebook, chart window, dialog window, input line, Objects sheet. Example: "No, No, Yes, No, No, No" makes the menu item available only when the chart window is active.
Checked type "Yes" if the command should have a checkmark display by it (optional)
Related topics
{ADDSERIES}
Syntax
{ADDSERIES Block, Name}
Description
{ADDSERIES} adds a data series to a floating chart. Use {ADDSERIES} as an equivalent to dragging cells onto a chart on a notebook sheet to add a series.
Example
The following macro adds the series contained in the cells A:E3..E13 to the floating chart named BUDGET:
{ADDSERIES A:E3..E13, BUDGET}
Parameters
Parameter Description
Block cells containing a data series
Name name of the chart to which you want to add a series
{ADDSUBMENUITEM} is like {ADDMENUITEM}, but converts the command indicated by MenuPath into a submenu and adds the new command to the submenu.
Link specifies the actions the submenu item performs (for example, "MACRO _remove_file" runs the macro _remove_file).
Tips
¿ You can add menu items to any menu, but if you change a context-sensitive menu (all menus between Edit and Tools on the menu bar), the change only applies to the menu in the active window. For example, suppose you use a macro to change the View menu when the notebook window is active. If you then open a chart window, the chart View menu appears--without the change. If you want the change to apply to that View menu as well, you must run the macro again.
¿ Changes made to the menu system using this command are not saved; they are lost when you exit Corel Quattro Pro. Each time you run a macro containing {ADDSUBMENUITEM}, the menu changes appear again.
Parameters
Parameter Description
MenuPath location in the menu system to insert a new menu item; enter the sequence of menu items separated by forward slashes (/); you can use <- and -> to place a menu at the top or before the bottom of a menu, respectively. For example, /File/<- specifies the first item on the File menu. You can also use numbers to identify menu items. For example, /File/0 specifies the first item on the File menu (the ID numbers start at zero).
Name name of the command to add; if you want a letter of the name to appear underlined, precede it with an ampersand (&)
Link action to perform when the command is chosen (optional); this argument can specify a link command or a macro command to run when the menu item is chosen; click here for details.
Hint help text to display on the status line when the command is highlighted (optional)
HotKey shortcut key that chooses the command (optional); separate key combinations with a plus sign (+), for example, Alt+F4.
DependString areas in which the command is available (optional); enter Yes or No for each area, separated by commas, in the following order: desktop, notebook, chart window, dialog window, input line, Objects sheet. Example: "No, No, Yes, No, No, No" makes the menu item available only when the chart window is active.
Checked type "Yes" if the command should have a checkmark display by it (optional)
Message displays a dialog box "message" for the user of the macro to manipulate. You set the title and message text of the dialog via the Title and Message arguments.
OKExit stores the result of the dialog box, so the macro can determine which button was pushed to close it.
Type specifies what type of message box will appear. It can be a message box with just an OK button, or one with both an OK and Cancel, etc.
Icon specifies which graphic to use on the above dialog. Zero represents the Error icon you would see on a regular error message under Windows. One is for the Question Mark icon, etc.
DefaultBtn determines which button (if there are multiple) is the "default" button. If this argument is a number greater than the number of buttons on the dialog, then the first button will be default.
Parameters
Parameter Description
Title Title of resultant dialog.
Message Message text of resultant dialog.
OKExit? Cell to store how the dialog box closed (1 for OK, 2 for Cancel, 3 for Abort, 4 for Retry, 5 for Ignore, 6 for Yes, 7 for No).
Type 0 for dialog with just an OK button, 1 for OK/Cancel, 2 for Abort/Retry/Ignore,3 for Yes/No/Cancel, 4 for Yes/No, and 5 for Retry/Cancel (optional; 0 is default).
Icon 0 for icon of type Error, 1 for Question, 2 for Warning, 3 for Info (optional; 0 is the default).
DefaultBtn 0 for first button being default, 1 for second, etc... (optional; 0 is the default).
{Align.Option}
Command equivalent Equivalent to
{Align.Bottom} Format Align Bottom
{Align.Horizontal_Center} Format Position Horizontal Center
{Align.Horizontal_Space Value} Format Space Horizontal Space
{Align.Left} Format Align Left
{Align.Right} Format Align Right
{Align.Top} Format Align Top
{Align.Vertical_Center} Format Position Vertical Center
{Align.Vertical_Space Value} Format Space Vertical Space
Description
{Align.Option} is the command equivalent for Format Align; its action depends on whether a chart or dialog window is active.
Value is the amount of space to leave between controls, in pixels.
Related topics
{ALT}
Syntax
{ALT+Key <Number>}
Description
{ALT} emulates holding down the Alt key while pressing the key specified by Key. Uses of {ALT} that would perform Windows task-switching functions (like Alt+Tab and Alt+Esc) are ignored.
You can combine {ALT}, {CTRL}, and {SHIFT}. For example, {CTRL+SHIFT+D} is equivalent to pressing Ctrl+Shift+D, the Date keys.
Example
{ALT+F} emulates pressing Alt+F, which could activate a control in a dialog box with an underlined letter of F.
Parameters
Parameter Description
Key keyboard macro command (PGUP, DOWN, and so on)
Number number of times to repeat the operation (optional)
Related topics
{AnalysisExpert}
Description
{AnalysisExpert} is the command equivalent for Tools Numeric Tools Analysis. The macro has no arguments. {AnalysisExpert} displays the first Analysis Tools Expert dialog box.
{ANOVA1} performs a one-way analysis of variance. Use {ANOVA1} to test whether two or more samples come from the same population. {ANOVA1} is equivalent to the Anova: One-Way analysis tool.
Parameters
Parameter Description
InBlock input cells containing two or more sets of numeric data arranged in columns or rows
OutBlock upper left cell of the output cells
Grouped "C" to group results by column or "R" to group results by row; the default is "C"
Labels 1 if labels are located in the first column or row of the input cells; 0 if the input cells do not contain labels; the default is 0
Alpha the significance level at which to evaluate values for the F-statistic; the default is 0.05
Related topics
{ANOVA2}
Syntax
{ANOVA2 InBlock, OutBlock, SampleRows, <Alpha>}
Description
{ANOVA2} performs a two-way analysis of variance, with more than one sample for each group of data. {ANOVA2} is equivalent to the Anova: Two-Way with Replication analysis tool.
Parameters
Parameter Description
InBlock input cells containing two or more sets of numeric data arranged in columns; the first row must contain labels for each group; the first column must contain row labels indicating the beginning of each sample
OutBlock upper left cell of the output cells
SampleRows the number of rows in each sample
Alpha the significance level at which to evaluate values for the F-statistic; the default is 0.05
{ANOVA3} performs a two-way analysis of variance, with only one sample for each group of data. {ANOVA3} is equivalent to the Anova: Two-Way Without Replication analysis tool.
Parameters
Parameter Description
InBlock input cells containing two or more sets of numeric data arranged in columns or rows
OutBlock upper left cell of the output cells
Labels 1 if labels are located in the first column or row of the input cells; 0 if the input cells do not contain labels; the default is 0
Alpha the significance level at which to evaluate the F-statistic; the default is 0.05
Related topics
{ANSIREAD}
Syntax
{ANSIREAD #Bytes, Location}
Description
{ANSIREAD} reads #Bytes bytes of characters from a file previously opened using {OPEN} (starting at the current position of the file pointer), and stores them as a label in Location, like {READ} but without any character mapping. This macro is provided for international users. See {READ}, for more information.
Parameters
Parameter Description
#Bytes number of bytes of characters to read from a file
Location cell in which to store the characters read
Related topics
{ANSIREADLN}
Syntax
{ANSIREADLN Location}
Description
{ANSIREADLN} is like {ANSIREAD}, but instead of using a number of bytes to determine the amount of text to read, {ANSIREADLN} reads forward from the current file pointer location up to and including the carriage-return/linefeed at the end of the line, like {READLN} but without any character mapping. This macro is provided for international users. See {READLN}, for more information.
Parameters
Parameter Description
Location cell in which to store the characters read
Related topics
{ANSIWRITE}
Syntax
{ANSIWRITE String,<String2>,<String3,...>}
Description
{ANSIWRITE} copies String(s) to a file opened with the {OPEN} command, starting at the location of the file pointer, like {WRITE} but without any character mapping. This macro is provided for international users. See {WRITE}, for more information.
Parameters
Parameter Description
String string of characters to be written into the open file
Related topics
{ANSIWRITELN}
Syntax
{ANSIWRITELN String,<String2>,<String3,...>}
Description
{ANSIWRITELN} copies String(s) to a file opened with {OPEN}, starting at the location of the file pointer, and ends the string(s) with the carriage-return and linefeed characters, like {WRITELN} but without any character mapping. This macro is provided for international users. See {WRITELN}, for more information.
Parameters
Parameter Description
String string of characters to be written into the open file as a single line
Related topics
{Application.Property}
Description
{Application.Property} is equivalent to choosing Tools Settings. The next table lists the possible settings. Items marked with an asterisk (*) appear only in Developer mode.
To display a property description with syntax, choose that property in the following list:
Property Tools Settings option
Country_Settings Currency Change
Current_File none
Display Display
Enable_Inspection Enable Inspection
File Options File Options
General General
International International
Macro Macro
Title Title
You can use {Application?} or {Application!} to display the Application dialog box. {Application?} lets the user manipulate the dialog box, whereas {Application!} relies on the macro to manipulate it. {Application.Property} is equivalent to Tools Settings.
{Application.Current_File} returns the name of the active notebook. This command equivalent is only used with @COMMAND and has no equivalent menu item.
Related topics
{Application.Display<.Option>}
{Application.Display<.Option>} Equivalent to Tools Settings...
{Application.Display.Default_View Draft|Page} Determines whether new Notebooks come up in Draft view or Page Preview view. Equivalent to Tools Settings Display Default View.
{Application.Display.History_List Yes|No} Determines whether to display the File History List off the File menu or not. Equivalent to Tools Settings Display Display last open documents on the File menu.
{Application.Display.Min_Number_Sheets N} Sets the default number of sheets on new Notebooks. Equivalent to Tools Settings Display Minimum Number of Sheet Tabs.
{Application.Display.Sheet_Tab_Label Letters|Numbers} Allows you to choose whether your default sheet tab names are letters (A..IV) or numeric (Sheet1..Sheet256). Equivalent to Tools Settings Display Sheet Tab Label.
{Application.Display.Show_GroupBox_As_Line Yes|No} Toggles dialog Group Boxes between being a "box", or just a line above the group. Equivalent to Tools Settings Display Show Groupbox as Line.
{Application.Display.Show_InputLine Yes|No} ... Display Show Input Line
{Application.Display.Show_PreSelection Yes|No} Toggles Windows buttons and other controls between being 3-D to being "flat." Equivalent to Tools Settings Display Show PreSelection.
{Application.Display.Show_Property_Band Yes|No} ... Display Show Property Bar
{Application.Display.Show_Scroll_Indicator Yes|No} ... Display Show Scroll Indicators
{Application.Display.Show_StatusLine Yes|No} ... Display Show Application Bar
{Application.Display.Sheet_Tab_Label Letters|Numbers} Toggles dialog Group Boxes between being a "box," or just a line above the group. Equivalent to Tools Settings Display Sheet Tab Label.
{Application.Display.Show_Tool_Hint Yes|No} ... Display Show QuickTips
{Application.Display.Show_Toolbar Yes|No} ... Display Show Toolbar
Description
{Application.Display.Option} is equivalent to choosing Tools Settings Display. It lets you specify cell syntax and display parts of the Corel Quattro Pro user interface. The arguments of {Application.Display} (which sets all options of the Display property in one command) use the same syntax as those in the {Application.Display.Option} commands.
Example
The following macro command hides the time, hides the standard Toolbar, displays the input line and status line, sets the cell syntax to standard, hides the Property Bar, and displays the scroll indicators and QuickTips.
{Application.Enable_Inspection} enables (Yes) or disables (No) Object Inspector menus. It is the command equivalent for choosing Tools Settings Enable Inspection, which is only available in Developer mode.
Related topics
{Application.File_Options<.Option>}
{Application.File_Options<.Option>} Equivalent to Tools Settings
{Application.File_Options.WPDialogs Yes|No} ... File Options Use enhanced file dialogs
Description
{Application.File_Options.Option} is equivalent to choosing Tools Settings File Options. It lets you specify the startup folder, autoload file, default file extension, and other options. The arguments of {Application.File_Options} (which sets all options of the File Options property in one command) use the same syntax as those in the {Application.File_Options.Option} commands.
¿ {Application.File_Options.AutoBack_Enabled} and {Application.File_Options.AutoBack_Time} enable the creation of temporary backup files at a specified time interval.
¿ {Application.File_Options.Autoload_File} sets the file to be loaded every time Corel Quattro Pro is started.
¿ {Application.File_Options.File_Extension} sets the default file extension to be used with file-handling commands.
¿ {Application.File_Options.Full_Path_Titles} shows the full path of notebook files in the title bar of the notebook window.
¿ {Application.File_Options.QuickTemplates} enables or disables the use of notebook templates when you choose File New.
¿ {Application.File_Options.Startup_Directory} sets the directory initially displayed by file-handling commands.
¿ {Application.File_Options.TempDir} specifies the directory containing QuickTemplate files.
Example
The following macro command sets the startup directory to C:\COREL\SUITE8, sets the autoload file to QUATTRO.WB3, sets the file extension to .WB3, enables autobackup at 15 minute intervals, enables the display of full path titles, enables QuickTemplates, sets the QuickTemplate directory, and sets the custom @function directory.
{Application.General.Calc-As-You-Go Yes|No} Turns on/off Calc As You Go. Equivalent to Tools Settings General Calc-As-You-Go.
{Application.General.Cell_Reference_Checker Yes|No} Turns on/off the Cell Reference Checker. Equivalent to Tools Settings General Cell Reference Checker.
{Application.General.Compatible_Formula_Entry Yes|No} ... General Compatible Formula Entry
{Application.General.Compatible_Keys Yes|No} ... General Compatible Keys
{Application.General.Delay_Time Integer} ... General Cell Drag and Drop Delay Time
{Application.General.Fit-As-You-Go Yes|No} Turns on/off Fit-As-You-Go, which automatically sizes columns on data entry. Equivalent to Tools Settings General Fit-As-You-Go.
{Application.General.MoveCellOnEnterKey Yes|No} ... General Move Cell Selector on Enter Key
{Application.General.QuickType Yes|No} Turns on/off QuickType, which as you type a label or function, finds the the closest match. Equivalent to Tools Settings General QuickType.
{Application.General.Undo Yes|No} ... General Undo Enabled
Description
{Application.General.Option} is equivalent to choosing Tools Settings General. It lets you
¿ enable the Edit Undo command
¿ makes a variety of keys work in the same way as in Corel Quattro Pro for DOS
¿ sets the behavior of the cell selector when you press Enter
¿ specifies how long to wait before changing from cell selection to Drag-and-Drop mode
¿ specifies whether to use formula entry from Corel Quattro Pro version 5
Example
The following macro command enables Undo, makes the cell selector move down when you enter data, sets the cell drag and drop delay time to 400 milliseconds, and uses Corel Quattro Pro formula entry.
{Application.International.Time_Format String} ... International Time
Description
{Application.International.Option} is equivalent to choosing Tools Settings International, which lets you specify the punctuation, sort order, and numeric formats used by Corel Quattro Pro. The arguments of {Application.International} (which sets all options of the International property in one command) use the same syntax as those in the {Application.International.Option} commands. For example, the Negative argument can be Signed or Parens, the same settings that {Application.International.Negative} accepts.
To set the currency symbol and its placement either before or after values, use the {Application.Country_Settings} macro.
Example
The following macro command specifies that the Corel Quattro Pro currency format is used with parentheses to indicate negative values, sets the punctuation, sets the date and time formats to Windows defaults, sets the sort order to English, disables LICS conversion, and sets the country used for currency to United States. The entire string must be enclosed within a set of quotes. (Enter all of the example into one cell.)
{Application.International ", Corel Quattro Pro,, Parens,""1,234.56 (a1,a2)"", Windows Default, Windows Default, Corel Quattro Pro, English (American), No, United States"}
Related topics
{Application.Macro<.Option>}
{Application.Macro<.Option>} Equivalent to Tools Settings...
{Application.Macro.Option} is equivalent to choosing Tools Settings Macro, which lets you control screen updates, display alternative menu systems, and run startup macros when you open a notebook. The arguments of {Application.Macro} (which sets all options of the Macro property in one command) use the same syntax as those in the {Application.Macro.Option} commands.
Example
The following macro command specifies that windows should not display when a macro runs, makes the slash key display the Corel Quattro Pro for DOS menu system, and sets the startup macro to BUDGET (Corel Quattro Pro will run a macro named BUDGET whenever a notebook is opened containing a macro by that name).
{Application.Macro "Window,,Corel Quattro Pro - DOS,BUDGET"}
Related topics
{Application.Title Title}
Description
{Application.Title Title} sets the title appearing in the Corel Quattro Pro title bar. It is equivalent to choosing Tools Settings Title, and it is only available in Developer mode.
Related topics
{ASSIGN}
Syntax
{ASSIGN VarExpr, ValExpr}
Description
The {ASSIGN} macro command is equivalent to the assignment statement variable=value in a programming language.
Example
{ASSIGN calc, CreateObject("DispCalc.Application")} creates an object of the DispCalc application and assigns it to a named variable calc.
{ASSIGN calc.accum, 0} clears the accumulated value of DispCalc.
{ASSIGN calc.accum, @SUM(A1..A10)} assigns the sum of A1..A10 to the accumulated value of DispCalc.
For more details on using {ASSIGN} and other OLE automation macro commands, Using OLE Automation Features.
Parameters
Parameter Description
VarExpr a variable expression
ValExpr a value expression
Related topics
{Audit.Remove_All_Arrows}
Description
Removes all precedent and dependent arrows.
Equivalent to Tools Auditing Remove All Arrows
Related topics
{Audit.Trace_Dependents}
Description
Traces dependents of current formula.
Equivalent to Tools Auditing Trace Dependents
Related topics
{Audit.Trace_Precedents}
Description
Traces precedents to current formula.
Equivalent to Tools Auditing Trace Precedents.
Related topics
{BACKSPACE} and {BS}
Syntax
{BACKSPACE <Number>}
Description
{BACKSPACE} and {BS} are equivalent to the Backspace key, which deletes one character to the left of the insertion point in Edit mode. The optional argument Number specifies how many times to repeat the operation; for example, {BACKSPACE 2} is equivalent to pressing Backspace twice.
Parameters
Parameter Description
Number any positive integer or the address of a cell containing a positive integer (optional)
Related topics
{BACKTAB}
Syntax
{BACKTAB <Number>}
Description
{BACKTAB} is equivalent to the Shift+Tab key. It is the same as {BIGLEFT}, which moves one cell to the left.
When the Compatible Keys option of Tools Settings General is checked, {BACKTAB} selects the leftmost cell of the screen that is to the left of the current one.
The optional argument Number specifies how many times to repeat the operation; for example, {BACKTAB 3} is equivalent to pressing Shift+Tab three times.
Parameters
Parameter Description
Number any positive integer or the address of a cell containing a positive integer (optional)
Related topics
{BEEP}
Syntax
{BEEP <Number>}
Description
{BEEP} sounds the computer's built-in speaker.
Number dictates the tone of the beep. If Number is omitted, {BEEP 1} sounds. If Number is larger than 10, the pattern repeats; for example, {BEEP 11} is the same as {BEEP 1}.
Use {BEEP} to catch the user's attention. You can use it in interactive macros to introduce a prompt for information or to indicate a macro has finished.
Example
The following macro checks a cell area named error_check for an error condition (indicated by error_check containing zero). If there is no error, it branches to a macro called _continue, which carries on the previous procedure. If there is an error, it gives a low beep, then a medium beep, and moves the selector to the cell area called message_area, where an error message is stored.
{IF error_check = 0}{BRANCH _continue}
{BEEP 1}{BEEP 5}{EditGoto message_area}
Parameters
Parameter Description
Number 1 to 10 (optional)
Related topics
{BIGLEFT}
Syntax
{BIGLEFT <Number>}
Description
{BIGLEFT} is equivalent to the Shift+Tab key. It is the same as {BACKTAB}, which moves one cell to the left.
When the Compatible Keys option of Tools Settings General is checked, {BIGLEFT} selects the leftmost cell of the screen that is to the left of the current one.
The optional argument Number specifies how many times to repeat the operation; for example, {BIGLEFT 2} is equivalent to pressing Shift+Tab twice.
Parameters
Parameter Description
Number any positive integer or the address of a cell containing a positive integer (optional)
Related topics
{BIGRIGHT}
Syntax
{BIGRIGHT <Number>}
Description
{BIGRIGHT}, like {TAB}, is equivalent to the Tab key, which moves one cell to the right.
When the Compatible Keys option of Tools Settings General is checked, {BIGRIGHT} selects the leftmost cell of the screen that is to the right of the current one.
The optional argument Number specifies how many times to repeat the operation; for example, {BIGRIGHT 2} is equivalent to pressing Tab twice.
Parameters
Parameter Description
Number any positive integer or the address of a cell containing a positive integer (optional)
Related topics
{BLANK}
Syntax
{BLANK Location}
Description
{BLANK} erases the contents of the cells referred to as Location. You can also use the command equivalents {ClearContents} and {EditClear} to erase the contents of the currently selected cells.
{BlockCopy} is the command equivalent for Edit Copy Cells. It copies the source cells to the specified destination. If ModelCopy? is 1, absolute references to cells within the copied cells adjust to reflect the new location. Formula?, Values?, Properties?, Object?, Row/Col_Sizes?, Labels?, and Numbers? apply only if ModelCopy? is 1.
You can use {BlockCopy?} or {BlockCopy!} to display the Copy Cells dialog box. {BlockCopy?} lets the user manipulate the dialog box, whereas {BlockCopy!} relies on the macro to manipulate it.
Parameters
Parameter Description
SourceBlock cells to copy
DestBlock location to copy cells
ModelCopy? whether to use Model Copy option; 0 = no, 1 = yes; the default is 0
Formula? whether to copy formula cells; 0 = no, 1 = yes; the default is 1
Values? whether to copy value cells; 0 = no, 1 = yes; the default is 1
Properties? whether to copy properties; 0 = no, 1 = yes; the default is 1
Object? whether to copy objects; 0 = no, 1 = yes; the default is 1
Row/Col_Sizes? whether to copy row and column sizes; 0 = no, 1 = yes; the default is 1
Labels? whether to copy label cells; 0 = no, 1 = yes; the default is 1
Numbers? whether to copy number cells; 0 = no, 1 = yes; the default is 1 (reserved for Cell Comments)
{BlockDelete.Option} is the command equivalent for Edit Delete. It deletes entire or partial columns, rows, and sheets. Block is the 2-D or 3-D selection where material is deleted.
You can use {BlockDelete?} or {BlockDelete!} to display the Delete dialog box. {BlockDelete?} lets the user manipulate the dialog box, whereas {BlockDelete!} relies on the macro to manipulate it.
Related topics
{BlockFill.Option}
Command equivalent Equivalent to Edit Fill Fill Series...
{BlockFill.Block Block} ... Cells
{BlockFill.Go} ... OK
{BlockFill.Order Column|Row} ... Fill Order
{BlockFill.Series Linear | Growth | Power | Year | Month | Week | Weekday |Day | Hour | Minute | Second} ... Fill Series
{BlockFill.Start Value} ... Fill Start
{BlockFill.Step Value} ... Fill Step
{BlockFill.Stop Value} ... Fill Stop
Description
{BlockFill.Option} is the command equivalent for Edit Fill Fil Series. It fills Block with sequential data. You can use numbers, dates, times, or even formulas for Value.
If {BlockFill.Start} is a number or formula, you can enter one of these strings for {BlockFill.Series}:
¿ "Linear" adds the step value to the previous value (defined at first to be the start value).
¿ "Growth" multiplies the step value by the previous value.
¿ "Power" uses the step value as the exponent of the previous value.
If {BlockFill.Start} is a date or time, the fill operation is always linear, but you can specify the step unit as "Year", "Month", "Week", "Weekday", "Day", "Hour", "Minute", or "Second". For example, with a start value of 6/20/92, a step value of 2, and "Month" as the {BlockFill.Series Option} setting, the second cell in the filled cells contains August.
You can enter the date and time directly as a serial number or use one of the date and time @functions.
You can use {BlockFill?} or {BlockFill!} to display the Fill Series dialog box. {BlockFill?} lets the user manipulate the dialog box, whereas {BlockFill!} relies on the macro to manipulate it.
Example
The following macro uses @DATEVALUE to enter 6/20/92 as the start value. The 3-D selection to fill is B..C:B1..D4 with a step value of 2. Fill order is "Row".
{BlockInsert.Option} is the command equivalent for Insert Cells and Insert File. It inserts entire or partial columns, rows, and sheets, or complete files. Block is the 2-D or 3-D selection where material is inserted. In {BlockInsert.File}, Filename is inserted into the active notebook before BeforeBlock.
You can use {BlockInsert?} or {BlockInsert!} to display the Insert Cells dialog box. {BlockInsert?} lets the user manipulate the dialog box, whereas {BlockInsert!} relies on the macro to manipulate it.
{BlockMovePages}
Syntax
{BlockMovePages SrcPages, BeforePage}
Description
{BlockMovePages} is the command equivalent for Edit Move Sheets. It reorders sheets within a notebook. Moved sheets appear before BeforePage.
You can use {BlockMovePages?} or {BlockMovePages!} to display the Move Sheets dialog box. {BlockMovePages?} lets the user manipulate the dialog box, whereas {BlockMovePages!} relies on the macro to manipulate it.
Parameters
Parameter Description
SrcPages range of sheets to move
BeforePage new location for SrcPages
Related topics
{BlockName.Option}
Command equivalent Equivalent to Insert Cell Names...
{BlockName.Option} is the command equivalent for Insert Cell Names. It creates, deletes, and displays names for contiguous and noncontiguous selections.
BlockName is the cell name to create or delete. In {BlockName.Create}, Block refers to the cells to name; in {BlockName.MakeTable}, Block indicates where to create the name table. {BlockName.Reset} clears all cell names in the notebook.
You can use {BlockName?} or {BlockName!} to display the Cell Names dialog box. {BlockName?} lets the user manipulate the dialog box, whereas {BlockName!} relies on the macro to manipulate it.
Related topics
{BlockReformat}
Syntax
{BlockReformat Block}
Description
{BlockReformat} is the command equivalent for Format Text Reformat. It adjusts word wrapping in a series of label entries (contained in Block) as though they were in a paragraph.
Parameters
Parameter Description
Block the cells to reformat
Related topics
{BlockTranspose}
Syntax
{BlockTranspose SourceBlock,DestBlock}
Description
{BlockTranspose} is the command equivalent for Tools Numeric Tools Transpose. It copies SourceBlock to another location and reverses its rows and columns. Existing data in DestBlock is overwritten.
You can use {BlockTranspose?} or {BlockTranspose!} to display the Transpose Cells dialog box. {BlockTranspose?} lets the user manipulate the dialog box, whereas {BlockTranspose!} relies on the macro to manipulate it.
Parameters
Parameter Description
SourceBlock cells to transpose
DestBlock cells to hold transposed copy
Related topics
{BlockValues}
Syntax
{BlockValues SourceBlock,DestBlock}
Description
{BlockValues} is the command equivalent for Edit Convert to Values. It copies cells to another location and converts their formulas to values. Existing data in DestBlock is overwritten.
You can use {BlockValues?} or {BlockValues!} to display the Convert to Values dialog box. {BlockValues?} lets the user manipulate the dialog box, whereas {BlockValues!} relies on the macro to manipulate it.
Parameters
Parameter Description
SourceBlock cells to copy as values
DestBlock cells to hold converted copy
Related topics
{BRANCH}
Syntax
{BRANCH Location}
Description
{BRANCH} runs the macro stored in Location. If Location references cells, Corel Quattro Pro starts with the macro command in the top left cell.
{BRANCH} can change the flow of execution based on a condition test. For example, you can use it to run a different macro depending on the contents of a certain cell.
{BRANCH} is like {Subroutine} in that it passes control to another macro. Unlike {Subroutine}, it does not hold your place in the original macro, waiting for control to return. Use {BRANCH} when you do not intend to return to the original macro. To run another macro and then return to the calling macro, use {Subroutine}.
Example
The following macro branches to a macro named _high if the value in cell D10 is greater than 1000; otherwise, it continues to run the macro on the next line:
{IF D10 > 1000}{BRANCH _high}
Parameters
Parameter Description
Location location or name of another macro
Related topics
{BREAK}
Description
{BREAK} clears any displayed dialog boxes or prompts and returns Corel Quattro Pro to Ready mode. It does not stop macro execution; use {QUIT} for that operation.
Related topics
{BREAKOFF}
Description
{BREAKOFF} disables Ctrl+Break, which can be used to end a macro before it is done. After {BREAKOFF}, the user will not be able to exit a macro until the end of the macro or until {BREAKON} is used.
Use {BREAKOFF} only when necessary. Without access to Ctrl+Break, the only way to stop a "runaway" macro is to reboot or turn off the computer.
Example
This macro disables Ctrl+Break while the user inputs a name:
{PUTCELL "Enter your name here:"}
{BREAKOFF}
{?}~
{BREAKON}
{PUTCELL "Try again: "}
{?}~
Related topics
{BREAKON}
Description
{BREAKON} enables Ctrl+Break after a previous {BREAKOFF} command has disabled it.
{BREAKON} should be used as soon as possible after {BREAKOFF}, because with Ctrl+Break disabled, the only way to halt a "runaway" macro is to reboot or turn off the computer.
See {BREAKOFF}for an example of {BREAKOFF} and {BREAKON}.
Related topics
{BudgetExpert}
Description
{BudgetExpert} is the command equivalent for Tools Numeric Tools Budget. The macro has no arguments. {BudgetExpert} displays the first Budget Expert dialog box.
Related topics
{CALC}
Description
{CALC} is equivalent to the Calc key, F9, which recalculates the active notebook, or converts the formula on the input line into its result when editing a cell.
Related topics
{CAPOFF} and {CAPON}
Description
{CAPOFF} and {CAPON} are equivalent to Caps Lock off and Caps Lock on, respectively.
Related topics
{ChartExpert}
Description
{ChartExpert} is the command equivalent for Insert Chart. The macro has no arguments. {ChartExpert} displays the first Chart Expert dialog box.
Related topics
{CHOOSE}
Description
{CHOOSE} displays a pick list of open windows. Your choice becomes the active window.
Related topics
{CLEAR}
Description
{CLEAR} is the equivalent of Ctrl+Backspace, which erases any previous entry in a prompt line or on the input line in Edit mode. This command is useful when loading or retrieving files.
Related topics
{ClearComments <PageOnly? (0|1)>}
Description
Deletes the comment in the active cell. PageOnly? flat refers to Group Mode. If Group mode is off, enter 0; if Group mode is on, and the active sheet belongs to a group, enter 1 to operate on only the active sheet or 0 to act on all sheets in the group. Equivalent to Rt-Clicking on the current cell, and choosing Delete Comment.
{ClearContents}
Syntax
{ClearContents <PageOnly?(0|1)>}
Description
{ClearContents} is the command equivalent for Edit Clear Values. It erases the contents of the selected cells but leaves cell property settings intact.
Parameters
Parameter Description
PageOnly? if Group mode is off, enter 0; if Group mode is on, and the active sheet belongs to a group, enter 1 to operate on only the active sheet or 0 to act on all sheets in the group
Related topics
{ClearFormats}
Syntax
{ClearFormats <PageOnly?(0|1)>}
Description
{ClearFormats} is the command equivalent for Edit Clear Formats. It resets the properties of cells but retains the values.
Parameters
Parameter Description
PageOnly? if Group mode is off, enter 0; if Group mode is on, and the active sheet belongs to a group, enter 1 to operate on only the active sheet or 0 to act on all sheets in the group
Related topics
{CLOSE}
Description
{CLOSE} ends access to a file previously opened using {OPEN}. This lets another file be opened (only one can be open at a time). {CLOSE} completes the process of writing information to a file, including an update of the disk directory. This step is crucial to the integrity of any file. If your computer is turned off before a file is closed, that file's contents may become corrupted or lost.
{CLOSE} fails in the event of a disk error, such as when a disk is removed from the disk drive before the file is closed. In this case, {ONERROR} is useful in intercepting the error. If {CLOSE} succeeds, macro execution continues in the cell below the cell containing the {CLOSE} command, ignoring any other commands in that cell. If {CLOSE} fails, macro execution continues in the same cell as the {CLOSE} command.
Example
The following macro opens a new file in drive A called AFILE, writes the text line Hello, world! to the file, and closes the file.
{COLUMNWIDTH} provides three ways to change the width of a column or columns (it is equivalent to the cell property Column Width). The columns to change are specified by Block. FirstPane? is used when the active window is split into panes (using View Split Windows). To resize the columns in the left or top pane, set FirstPane? to 1; to resize the columns in the right or bottom pane, set FirstPane? to 0.
The argument Set/Resize/Auto specifies how to change the width. To set a column width, use this syntax: {COLUMNWIDTH Block, FirstPane?, 0, NewSize}.
NewSize is the new column width, in twips (a twip is 1/1440th of an inch). The maximum width is 20 inches (28,800 twips).
To reset a column to the default width (set by Default Width in the sheet Object Inspector) use this syntax: {COLUMNWIDTH Block, FirstPane?, 1}.
To automatically size a column based on what is entered in it, use this syntax: {COLUMNWIDTH Block, FirstPane?, 2, ExtraCharacters}
ExtraCharacters is the number of characters to add on to the calculated width. If this argument is omitted, the default is used (1 character).
Example
{COLUMNWIDTH A:A..B,1,0,1440} sets the width of columns A and B (on sheet A) to one inch (1,440 twips).
{COLUMNWIDTH A:A..B,0,0,2160} sets the width of columns A and B (on sheet A) to one and a half inches (2,160 twips). If the window is split, the columns are resized in the left or top pane.
{COLUMNWIDTH A:C,1,1} resets the width of column C (on sheet A) to the default width.
{COLUMNWIDTH A:C,1,2,3} automatically sizes column C (on sheet A) and adds three characters to the calculated width.
Parameters
Parameter Description
Block cells containing columns to resize
FirstPane? 1 to resize columns in left or top window pane; 0 to resize columns in right or bottom window pane
Set/Reset/Auto 0 to set the column width; 1 to reset the column width; 2 to automatically size the column(s)
Size new width (in twips) if Set/... = 0; not needed if Set/... = 1; resetting size; extra characters (optional) if Set/... = 2
Related topics
{Comment.Edit <CommentText>}
Description
Creates/updates a comment in the active cell, and leaves comment "bubble" in edit mode for you to insert the comment text. If a comment already exists, it brings up the comment "bubble" in edit mode for you to edit the existing comment. Equivalent to Insert Comment, or Rt-Clicking on a cell, and choosing Insert Comment (or Edit Comment, if you are editing an existing comment).
{Comment.EditURL <URLText>}
Description
Brings up the Insert Hyperlink dialog, allowing the user to insert, modify, or delete a hyperlink. Equivalent to Insert Hyperlink.
{ComposeFormula}
Description
{Compose Formula} is the command equivalent of clicking the Formula Composer button on the Notebook toolbar. The macro has no arguments. {ComposeFormula} displays the Formula Composer dialog box.
Related topics
{Consolidate.Option}
Command equivalent Equivalent to Tools Consolidate Edit...
{Consolidate.Reset} No equivalent; clears Source Cells and Destination Cells, and resets Options to default values in the Consolidation dialog box.
{Consolidate.Save Name} ... Save As
{Consolidate.Use Name} ... Consolidations
Description
{Consolidate.Option} is the command equivalent for Tools Consolidate New. It combines data from multiple selections into one using your choice of operators. Block defaults to the current selection if the argument is not supplied.
You can use {Consolidate?} or {Consolidate!} to display the Consolidation dialog box. {Consolidate?} lets the user manipulate the dialog box, whereas {Consolidate!} relies on the macro to manipulate it.
Example
The following macro adds the values in the source cellss B2..B4, C2..C3, and D2..D4, and returns values in the destination cells F2..F4.
{Consolidate.Add_Source_Block A:B2..B4}
{Consolidate.Add_Source_Block A:C2..C3}
{Consolidate.Add_Source_Block A:D2..D4}
{Consolidate.Function SUM}
{Consolidate.Destination A:F2..F4}
{Consolidate.Options 1,0,0}
{Consolidate.Go}
{Consolidate.Save CONSOL1}
Related topics
{ConsolidateExpert}
Description
{ConsolidateExpert} is the command equivalent for Tools Consolidate New. The macro has no arguments. {ConsolidateExpert} displays the first Consolidate Expert dialog box.
Related topics
{CONTENTS}
Syntax
{CONTENTS Dest, Source, <Width#>, <Format#>}
Description
{CONTENTS} copies the contents of Source into Dest, but unlike {LET} or other copy commands, if Source contains a value entry, it translates the copied value into a label and stores it in Dest. It also lets you specify a different numeric format and column width using the Width# and Format# arguments.
Width# can be any number from 1 to 1023. Corel Quattro Pro will not alter the width of the destination column but will treat the resulting string as if it came from a column with the specified width. For example, if a value is displayed as ***** in the source column because the column is not wide enough, specifying a wider Width# will let the value be copied as it would be displayed within that width, not as *****. Width# is optional, but must be provided if Format# is used. If you do not specify Width#, the width of the source column is assumed. Use the maximum width if you want all values to come across properly. You can use @TRIM with a {LET} command to remove any leading spaces from the label.
Format# can be any number from 0 to 127. Each number in this range corresponds to a specific numeric format and decimal precision. Format# affects the Dest entry only, not the Source value. See Numeric Format Codes for a list of special codes used to indicate numeric formats with Format#.
Example
The following examples assume cell C18 contains the value 48,988 in comma format with a column width of 12.
{CONTENTS A18,C18}
Places the 12-character label ' 48,988 in cell A18 (six spaces are inserted at the beginning).
{CONTENTS E10,C18,3}
Places the 3-character label '*** in cell E10. (Only asterisks are copied because the value does not fit within three spaces.)
{CONTENTS A5,C18,15,34}
Places the 15-character label ' $48,988.00 in cell A5 (five spaces are inserted at the beginning).
Parameters
Parameter Description
Dest cell you want data written to
Source cell you want data copied from
Width# optional column width (1 to 1023)
Format# optional format code
Related topics
{Controls.Option}
Command equivalent Equivalent to...
{Controls.Order} Format Value Order Set New
{Controls.OrderFrom} Format Value Order Reorder From First
{Controls.OrderTab} Format Tab Order Set New
{Controls.OrderTabFrom} Format Tab Order Reorder From First
Description
{Controls.Option} is equivalent to Format Value Order and Format Tab Order. It affects selected objects in the dialog window.
Related topics
{CR} or ~
Description
{CR} or ~ (tilde) are equivalent to the Enter key.
With {CREATEOBJECT} you can add objects to the active window normally added using the Toolbar. {CREATEOBJECT} is context-sensitive, letting you create lines in a chart window or check boxes in a dialog window. Corel Quattro Pro interprets the coordinates specified after ObjectType differently based on the object type. The following table lists the possible chart object settings for ObjectType, and how each chart object uses the (x,y) coordinates.
Chart Objects {CREATEOBJECT} Can Generate
Object # of (x,y)'s Coordinates
Line 2 1st: Start point, 2nd: End point
Arrow (same as for Line)
Block 2 1st: Upper left corner, 2nd: Width and height of the objects (in relative coordinates)
Rect (Rectangle) 2 (same as for Block)
Ellipse 2 1st: Upper left corner of a rectangle bounding the ellipse; 2nd: Width and height of the bounding rectangle
Rounded_Rect (same as for Block)
Text (same as for Block)
Polyline Varies 1st: Start point, 2nd: End point of first segment and start of second segment; 3rd: End point of second segment and start of third segment, ... nth: End point
Polygon (same as for Polyline)
Freehand_Polyline (same as for Polyline)
Freehand_Polygon (same as for Polyline)
Block Objects
The Block object has additional arguments for {CREATEOBJECT}:
Block sets the notebook cells to use. The remaining arguments specify whether to show borders and grid lines and whether to maintain the cells' aspect ratio.
Dialog Controls {CREATEOBJECT} Can Generate
You can create these dialog controls listed in the order they appear on the Dialog Toolbar: Button, CheckBox, RadioButton, BitmapButton, Label, EditField, SpinCtrl, Rectangle, GroupBox, RangeBox, ComboBox, PickList, FileCtrl, ColCtrl, ScrollBar, HScrollBar, TimeCtrl. When creating a control, x1 and y1 specify the upper-left corner of the control; x2 and y2 specify the width and height of the control, in pixels.
ObjectType is enclosed in quotes. The x and y coordinates for each point follow, separated by commas.
Example
{CREATEOBJECT "Rect",86,11,94,74} creates a rectangle with upper-left corner = (86,11), width = 94, and height =74 (pixels).
{CREATEOBJECT "Block", 363, 260, 1278, 1139, "A:B2..D9", "No,No,Yes,Yes,Yes"} creates notebook cells in a chart window with upper-left corner = (363, 260), width = 1278, and height = 1139; the other arguments specify the notebook cells, turn off row and column borders, show grid lines, and maintain the cells' aspect ratio.
{CREATEOBJECT "Line",260,238,356,228} creates a line that starts at (260,238) and ends at (356,228).
{CREATEOBJECT "Polyline",2,2,23,59,11,26} creates a polyline that starts at (2,2), draws a line to (23,59), and then draws a line from that point to (11,26).
Parameters
Parameter Description
ObjectName type of object to create
x1, y1 xy coordinates for the starting point of the object; the upper left corner for rectangles and objects bounded by rectangles
x2, y2 xy coordinates for the end point or next point of the object; the width and height for rectangles and objects bounded by rectangles
x3, y3 xy coordinates for the next or last point of a polyline or polygon object
All items surrounded by <> are optional. All quotes in this macro command must be included in order for the macro to function.
All Column, Row and Data items are to be replaced with the field number containing the data to be used. Fields go from 0 to however many columns are passed into Cross Tabs. Columns are numbered from left to right in the source range, 0 being the first column of the selection.
Notice that if the 3D Sheet Name is not included, the macro must have the empty quotes or it will not function properly.
Parameters
Parameter Description
Data Option SUM, AVERAGE, COUNT, % of COLUMN, % of ROW, % of GRAND, or STRING
Row and Column Options SUM, AVERAGE, COUNT, % of COLUMN, % of ROW, % of GRAND, INCREASE, % INCREASE, or STRING
{CTRL}
Syntax
{CTRL+Key <Number>}
Description
{CTRL} emulates holding down the Ctrl key while pressing a keystroke. For example, {CTRL+PGDN 5} emulates pressing Ctrl+PgDn five times to move down five notebook sheets. Keystrokes that would perform Windows task switching, such as Ctrl+Esc, are ignored.
You can combine {ALT}, {CTRL}, and {SHIFT}. For example, {CTRL+SHIFT+D} is equivalent to pressing Ctrl+Shift+D, the Date keys.
Parameters
Parameter Description
Key keyboard macro command (PGUP, DOWN, and so on)
Number number of times to repeat the operation (optional)
The {DatabaseQuery} macro sends the specified SQL statement to either ODBC or BDE and places the returned data in the specified block of cells.
{DatabaseQuery} is equivalent to Insert External Data Expert.
Parameters
Parameter Description
Type Type of database to query: "Paradox", "ODBC", or "BDE (Borland Database Engine)".
Name Name of the database. If the type is Paradox, the name must be a path. If the type is ODBC, the name is a Data Source Name (DSN) from the user's ODBC configuration. If the name is BDE, the name is an alias name from the user's IDAPI/BDE configuration.
QueryString An SQL Statement.
Destination The destination block of cells where to send the result.
{DATE}
Description
{DATE} is equivalent to pressing Ctrl+Shift+D, which lets users enter a date or time into the active cell.
You can enter a date in a cell without using Ctrl+Shift+D. Just type a date in one of Corel Quattro Pro's date formats--for example, 6/1/95.
Example
{DATE}8/6/90~ enters 8/6/90 in the active cell as a date.
{DATE}{?}~ pauses to let the user enter a date, then enters that date into the active cell.
Related topics
{DbAlias}
Syntax
{DbAlias WORK | PRIV, Path}
Description
{DbAlias} is the command equivalent for Insert External Data Aliases which lets you specify a private directory to hold temporary files, or a working directory where external data tables are most likely to be found.
Parameters
Parameter Description
WORK | PRIV WORK to specify a Working directory; PRIV to specify a Private directory
Path path for the Working directory or the Private directory
Related topics
{DEFINE}
Syntax
{DEFINE Location1<:Type1>, Location2<:Type2>,...}
Description
When you pass control to a subroutine with the {Subroutine} command, you can also pass arguments for use by that subroutine. If you do, you must include a {DEFINE} command in the subroutine's first line. This command defines the data type of *each argument passed and indicates which cells to store the arguments in. If no {DEFINE} command is included, the arguments are ignored.
{DEFINE} sequentially defines the arguments passed to the subroutine. The first location and type given are assigned to the first argument passed, the second location and type to the second argument, and so on.
You must specify a location for each argument. This tells Corel Quattro Pro where to copy them. If there are more locations given than arguments passed, or more arguments than locations, the macro ends immediately, and an error message displays.
Type is optional. It tells Corel Quattro Pro whether the argument is a value or string. If no data type is given, the argument is assumed to be a literal string (even if it is a valid cell name, cell address, or value). If you add :string (or :s) to the location, any argument passed is stored as a label. If you add :value (or :v), Corel Quattro Pro treats the coming argument as a number or value resulting from a numeric formula. It it is not a numeric value, Corel Quattro Pro treats it as a string (or string value from a formula).
Example
In the following example, the \F macro passes three arguments (principal, interest, and term) to the subroutine _calc_loan, which stores the arguments in named cells and defines them as values. It then
¿ uses the arguments to calculate the monthly payment on a loan
¿ stores the result in a cell named amount
¿ creates a label in a cell named payment displaying that amount as currency
¿ returns control to the main macro
The main macro (\F) displays the result in the active cell preceded by the string "The monthly payment will be ".
txt_area +"The monthly payment will be "&@TRIM(payment)
Parameters
Parameter Description
Location cell in which you want to store the argument being passed
Type string or value; string (or s) stores the value or formula as a label, and value (or v) stores the actual value or value resulting from a formula (optional)
Related topics
{DEL} and {DELETE}
Description
{DEL} and {DELETE} are equivalent to the Del key.
Related topics
{DELETEMENU}
Syntax
{DELETEMENU MenuPath}
Description
{DELETEMENU} removes the menu specified by MenuPath from the menu system. See the description of {ADDMENU} for the syntax of MenuPath. Use {DELETEMENUITEM} to remove an individual menu item.
Tips
¿ You cannot delete menus between Edit and Tools on the menu bar. The area between these menu positions is reserved for context-sensitive menus that change depending on the active window. You can add menu items to menus between the Edit and Tools menus, but the new menu items will be swapped out of the menu when the context changes.
¿ Changes made to the menu system using this command are not saved; they are lost when you exit Corel Quattro Pro. Each time you run a macro containing {DELETEMENU}, the menu changes appear again.
¿ To restore the original menu bar, use the macro command {SETMENUBAR} without an argument
Example
{DELETEMENU "/File"} removes the File menu from the active menu system.
Parameters
Parameter Description
MenuPath menu in the tree to delete; type a forward slash (/) followed by the menu name; for example, to delete the Edit menu, type /Edit.
Related topics
{DELETEMENUITEM}
Syntax
{DELETEMENUITEM MenuPath}
Description
{DELETEMENUITEM} removes the menu item specified by MenuPath from the menu system. Use {DELETEMENU} to remove entire menus from the active menu system.
Tips
¿ You can delete menu items from any menu, but if you change a context-sensitive menu (all menus between Edit and Tools on the menu bar), the change only applies to the menu in the active window. For example, suppose you use a macro to change the View menu when the notebook window is active. If you then open a chart window, the chart View menu appears--without the change. If you want the change to apply to that View menu as well, you must run the macro again.
¿ Changes made to the menu system using this command are not saved; they are lost when you exit Corel Quattro Pro. Each time you run a macro containing {DELETEMENUITEM} the menu changes appear again.
¿ To restore the original menu bar, use the macro command {SETMENUBAR} without an argument.
Example
{DELETEMENUITEM "/Edit/Clear"} removes the Edit Clear command.
{DELETEMENUITEM "/Edit/<-"} removes the first item on the Edit menu.
Parameters
Parameter Description
MenuPath menu item in the tree to delete; enter the sequence of menu items separated by forward slashes (/); you can use <- and -> to specify an item menu at the top or bottom of a menu, respectively. For example, /File/<- specifies the first item on the File menu. You can also use numbers to identify menu items. For example, /File/0 specifies the first item on the File menu (the ID numbers start at zero)
Related topics
{DELVAR}
Syntax
{DELVAR VarName1<,VarName2,...>}
Description
{DELVAR} deletes unused named variables. Named variables are used to control OLE objects. OLE objects are released from control at the end of macro execution, but named variables remain until you exit Corel Quattro Pro. You can delete the unused named variables to free an object assigned to that name, and then control the object using another macro.
Example
{DELVAR} deletes all named variables
{DELVAR calc} deletes a named variable calc
{DELVAR calc 0, calc 1, calc 3} deletes the named variables calc 0, calc 1, and calc 3.
For more details on using {DELVAR} and other OLE automation macro commands, Using OLE Automation Features.
{DESCR} returns a table of descriptive statistics that characterize a sample. {DESCR} is equivalent to the Descriptive Statistics analysis tool.
Parameters
Parameter Description
InBlock one or more numeric cell values representing the input cells
OutBlock upper left cell of the output cells
Grouped "C" to group results by column or "R" to group results by row; "C" is the default
Labels 1 if labels are located in the first column or row of the input cells; 0 if the input cells do not contain labels; the default is 0
Summary 1 to display summary statistics; 0 to omit summary statistics; the default is 0
Largest a value n which, if present, makes {DESCR} report the nth largest data point; if omitted, the largest data point is not reported
Smallest a value n which, if present, makes {DESCR} report the nth smallest data point; if omitted, the smallest data point is not reported
Confidence confidence level of the mean; the default is 0.95
Related topics
{DialogView}
Syntax
{DialogView Window}
Description
{DialogView} lets you edit an existing dialog box.
Parameters
Parameter Description
Window dialog window to make active
Related topics
{DialogWindow.Property}
Description
{DialogWindow.Property} is equivalent to right-clicking the title bar of a dialog window to set its properties.
{DialogWindow} commands affect the active dialog window. The next table lists the possible settings for Property. To display a property description with syntax, choose that property in the following list:
{DialogWindow.Dimension.Option} is equivalent to the dialog window property Dimension, which lets you move and resize the active dialog window. Each argument is specified in pixels. XPos and YPos specify the distance in pixels from the left side of the Corel Quattro Pro window and bottom of the input line, respectively.
Example
The following macro command positions the active dialog window two pixels from the left edge of the Corel Quattro Pro window, five pixels below the input line, sets the width to 150 pixels, and sets the height to 250 pixels.
{DialogWindow.Dimension "2,5,150,250"}
Related topics
{DialogWindow.Disabled Yes|No}
Description
{DialogWindow.Disabled Yes|No} disables (Yes) or enables (No) the active dialog box or Toolbar. This command only works when the user is viewing a dialog box or Toolbar; it does not work when editing one.
{DialogWindow.Grid_Options GridSize, ShowGrid, SnapToGrid} sets the grid size of the active dialog window. Use GridSize to specify the distance between grid points in pixels; ShowGrid specifies whether the grid is visible; SnapToGrid specifies whether objects snap to the grid.
Example
The following macro sets the distance between grid points to 10, shows the grid, and enables it.
{DialogWindow.Grid_Options "10,Yes,Yes"}
Related topics
{DialogWindow.Name Name}
Description
{DialogWindow.Name Name} sets the name of the active dialog window. This name is used by macro commands, @functions, and link commands to identify the dialog box (or Toolbar).
{DialogWindow.Position_Adjust Depend, LeftRel, TopRel, RightRel, BottomRel, CenterHor, CenterVer} specifies how the active dialog box resizes when the Corel Quattro Pro window is resized. The arguments are equal to options in the Position Adjust dialog box; click here for directions on using the Position Adjust property.
Related topics
{DialogWindow.Title String}
Description
{DialogWindow.Title String} specifies the title that appears on the dialog box when the user is viewing it (the title does not appear when editing the dialog box).
Related topics
{DialogWindow.Value String}
Description
{DialogWindow.Value String} sets the initial settings of the dialog box (or Toolbar). You can use it with @COMMAND to find the current settings of the dialog box. String is a comma separated list of settings. Each setting sets the initial value of one control. Control values appear in this list if their Process Value property is set to Yes. You can set the order of the settings while editing the dialog box.
Example
The following macro command sets the initial values of a dialog box with three controls. Each setting maps to one control.
{DialogWindow.Value "25000,5,1st of month"}
Related topics
{DISPATCH}
Syntax
{DISPATCH Location}
Description
{DISPATCH} is similar to {BRANCH}, except it uses Location differently:
¿ If Location is a cell address or one named cell, {DISPATCH} branches to the address stored in that cell.
¿ If Location is a text formula resulting in a cell or one named cell, {DISPATCH} branches to the address stored in that result address. (In Quattro Pro DOS, {DISPATCH} branches to the actual result address.)
¿ If Location contains cells or a text formula resulting in cells, {DISPATCH} branches to the first cell of those cells.
{DISPATCH} is useful when you want to branch to one of several alternative macros, depending on circumstances. You can also set up a macro that modifies the contents of Location, depending on user input or test conditions.
Example
The macro _continue in the following example uses {DISPATCH jump_cell} to create a form letter that changes depending on the result of a credit check.
Type the line to the right of \F with no hard returns until after the first {BRANCH _continue}, then press Enter to insert the text into one cell.
{DLL} runs a macro or returns a value from an add-in @function contained in a dynamic-link library file. The @function can have up to 16 arguments.
Example
This statement calls the @function AMPLITUDE, included in the DLL Math, with two selections as arguments:
{DLL Math.AMPLITUDE,A1..A10,B1..B10}
Parameters
Parameter Description
DLLName the name of a DLL file (if not already loaded)
FunctionName the name of an @function contained in the DLL
Argument1,Argument2... arguments to the @function
Related topics
{DLL.Load}
Syntax
{DLL.Load DLLName}
Description
{DLL.Load} loads a dynamic-link library (DLL) program. You can use {DLL.Load} to load a DLL containing add-in @functions or macros. When the DLL is loaded, you can reference add-in @functions contained in the DLL without typing the DLL name. Similarly, macros contained in the DLL become resident in memory.
You can use {DLL.Load} to define a startup macro in QPW.INI.
{DODIALOG} displays a dialog box for the user or the macro to manipulate. MacUse? specifies how the dialog box is manipulated; if 0, the macro manipulates the dialog box, if 1, the macro pauses so the user can manipulate the dialog box.
DialogName is the name of the dialog box to display. Arguments refers to the cells containing initial settings for controls in the dialog box. Each cell in Arguments corresponds to one control in the dialog box with a Process Value property set to Yes; the order of controls in the dialog box determines which cell maps to which control (the first cell maps to the first control, the second cell maps to the second, and so on).
If a dialog box is under macro control (MacUse? set to 0), you can make it revert to user control using {PAUSEMACRO}.
Once the dialog box closes (performing its function), Corel Quattro Pro writes the new control settings into their respective cells. OKExit? is a cell containing the result of the dialog box operation; 1 if OK was chosen, 0 if the dialog box was canceled.
Parameters
Parameter Description
DialogName name of dialog box to display
OKExit? cell to store how the dialog box closed (1 for OK, 0 for Cancel)
Arguments cells to store the initial settings for controls in the dialog box and their final settings (optional)
MacUse? 1 if the user should manipulate the dialog box, 0 if the macro manipulates it (optional; 1 is the default)
Related topics
{DOWN} and {D}
Syntax
{DOWN <Number>} or {D <Number>}
Description
{DOWN} and {D} are equivalent to the Down key. The optional argument Number moves the selector down the corresponding number of rows. You can also use cell references or cell names as arguments.
Example
{DOWN}{DOWN} moves the selector down two rows.
{DOWN 4} moves the selector down four rows.
{DOWN G13} moves down the number of rows specified in cell G13.
{DOWN count} moves down the number of rows specified in the first cell of the named area "count".
Parameters
Parameter Description
Number any positive integer (optional)
Related topics
{DraftViewGoto}
Description
Switches from either the Objects Sheet or the sheet in Page View mode to Draft View. Equivalent to View Draft.
Related topics
{DUPLICATE}
Syntax
{DUPLICATE xoffset, yoffset}
Description
{DUPLICATE} copies selected chart annotations or dialog box controls. If no object is selected, {DUPLICATE} does nothing.
xoffset and yoffset are measured in relative coordinates for objects in a chart window, and in pixels for dialog box objects.
Example
The following macro activates a floating chart for editing, creates a rectangle in the chart, makes a copy of the rectangle, then deactivates editing.
{GraphEdit Chart1, 1}
{CreateObject Rect,147,176,416,427}
{Duplicate 269,338}
{GraphDeactivate}
Parameters
Parameter Description
xoffset offset from the left edge of UpperCell to the left edge of the floating object
yoffset offset from the top edge of UpperCell to the top edge of the floating object
{EDIT}
Description
{EDIT} is equivalent to the Edit key, F2. Its main use is in Edit mode, where it lets you edit the contents of the active cell. You can also use it to search for items in a long list.
Related topics
{EditClear}
Description
{EditClear} is the command equivalent for Edit Clear Cells. It erases the contents and properties of the current cells, deletes selected objects from dialog and chart windows, and deletes selected floating objects. To erase cells while leaving their properties intact, use {ClearContents}.
Related topics
{EditCopy}
Description
{EditCopy} is the command equivalent for Edit Copy. It copies the selected object to the Clipboard.
Related topics
{EditCut}
Description
{EditCut} is the command equivalent for Edit Cut. It removes the selected object from the spreadsheet and moves it to the Clipboard.
Related topics
{EditGoto}
Syntax
{EditGoto Block,<Extend?(0|1)>}
Description
{EditGoto} is the command equivalent for Edit Go To. It selects and displays Block within spreadsheet sheets, but not the Objects sheet.
You can use {EditGoto?} or {EditGoto!} to display the Go To dialog box. {EditGoto?} lets the user manipulate the dialog box, whereas {EditGoto!} relies on the macro to manipulate it.
Parameters
Parameter Description
Block cells to display and select
Extend? whether to extend the selection from the current selection to the specified cells; 0 = no, 1 = yes; the default is 0
Related topics
{EditPaste}
Description
{EditPaste} is the command equivalent for Edit Paste. It copies data and its properties from the Clipboard into the notebook.
To paste only values or properties, use {PasteSpecial}. {PasteLink} creates a live DDE link, and {PasteFormat} adds many types of data from other applications (including embedded OLE objects).
Related topics
{END}
Description
{END} is equivalent to the End key.
Related topics
{ESC} and {ESCAPE}
Description
{ESC} and {ESCAPE} are equivalent to the Esc key, which is useful for clearing menus or dialog boxes from the screen, one at a time. To clear all prompts and return Corel Quattro Pro to Ready Mode, use {BREAK}.
Related topics
{EXEC}
Syntax
{EXEC AppName, WindowMode, <ResultLoc>}
Description
{EXEC} lets you run other Windows applications or DOS commands. AppName can be any valid command string you could type in the Windows Run dialog box. AppName can contain the path of the application. If no path is given, then the application must be in the system path so Windows can find it.
ResultLoc is useful in some cases where the started application supports DDE along with an instance number. For example, Excel and Corel Quattro Pro respond to their names and also respond to their names concatenated with an instance number.
Example
{EXEC "C:\COREL\SUITE8\PROGRAMS\WPWIN8.EXE",2} runs Corel WordPerfect for Windows as a minimized application
{EXEC "NOTEPAD.EXE",1} runs the Windows Notepad and displays it just as if it were run from the Start button on the taskbar.
{EXEC "C:\COMMAND.COM /C DIR>TEST.TXT",1} stores the current directory listing in the file TEST.TXT for Windows, except for Windows NT 4.0.
{EXEC "C:\CMD.EXE /C DIR>TEST.TXT",1} stores the current directory listing in the file TEST.TXT in Windows NT 4.0.
Parameters
Parameter Description
AppName name (in quotes) of the application to run (up to 100 characters)
WindowMode size state of the application's window: 1 or 101 for normal size, 2 or 102 for minimized, 3 or 103 for maximized; use 101, 102, 103 to suspend macro execution until the application terminates
ResultLoc cell containing the coded explanation of the operation's success
Related topics
{EXECAUTO}
Syntax
{EXECAUTO AutoExpr1<,AutoExpr2>}
Description
{EXECAUTO} executes one or more methods in another application, but drops any return values.
Example
{EXECAUTO calc.Display()} asks DispCalc to display its current input value.
{EXECAUTO calc.Button(A1), calc.Display()} passes the value in A1 as an input to DispCalc and asks DispCalc to diplay it.
For more details on using {EXECAUTO} and other OLE automation macro commands, Using OLE Automation Features.
Parameters
Parameter Description
AutoExpr1,2... one or more automation expressions
{EXECUTE}
Syntax
{EXECUTE DDEChannel,Macro,<ResultLoc>}
Description
With {EXECUTE} you can make other applications that support DDE run their macros. The macro to run is stored in the string Macro. It must be in the syntax the application normally uses (refer to the documentation for each application). You must open a channel of conversation with the other application using {INITIATE} (which determines the value of DDEChannel) before using {EXECUTE}.
The contents of ResultLoc depend on the application you are contacting. Most often, if a macro succeeds, ResultLoc contains 1. If a macro fails, {EXECUTE} results in an error.
See {REQUEST} and {POKE} for more information on receiving data from and sending data to other applications using DDE.
Example
The following example initiates a DDE conversation with Corel WordPerfect's macro server and opens REPORT.DOC in Corel WordPerfect.
channel 1
{INITIATE "WPWin7_Macros","COMMANDS",channel}
{EXECUTE channel,"FileOpen(""report.doc"")"}
{TERMINATE channel}
Parameters
Parameter Description
DDEChannel channel ID number of the application to run a macro in
Macro string containing the macro command(s) to run
ResultLoc a cell indicating the result of the operation
Related topics
{EXPON}
Syntax
{EXPON InBlock,OutBlock,<Damping>,<StdErrs>}
Description
{EXPON} performs exponential smoothing on a series of values. {EXPON} is equivalent to the Exponential Smoothing analysis tool.
Parameters
Parameter Description
InBlock input cells containing a single column or row with at least four numeric values; the cells must not contain labels
OutBlock upper left cell of the output cells
Damping damping factor used as the exponential smoothing constant; indicates the percentage for error to adjust each prior forecast value; must be │ 0; the default is 0.3
StdErrs flag indicating whether standard errors are included in the output table: yes (1) or no (0); the default is 0
{ExportGraphic} is the command equivalent for Chart Export to File. It saves selected graphic objects to one of several file types with optional gray-scaling and compression.
You can use {ExportGraphic?} or {ExportGraphic!} to display the Export Graphics File dialog box. {ExportGraphic?} lets the user manipulate the dialog box, whereas {ExportGraphic!} relies on the macro to manipulate it.
Parameters
Parameter Description
Filename name of the graphic file to export
GrayScale? whether to gray-scale: no (0), yes (1); the default is 0
Compression? type of .TIF file compression to use: none (0) or PackBits (1); the default is 0
Related topics
{FileClose} and {FileCloseAll}
Command equivalent Equivalent to ...
{FileClose <DoSave? (0|1)>} File Close
{FileCloseAll <DoSave? (0|1)>} no equivalent
Description
{FileClose} closes all views of the active notebook; {FileCloseAll} closes all open notebooks. The optional argument DoSave? indicates whether to display a save prompt before closing files with changes. Use 1, the default, to prompt for changes; 0 suppresses save prompts.
{FileCombine} is the command equivalent for Tools Data Tools Combine Files. If you use the "Copy" option, it copies all or part of a notebook into the active notebook (starting at the selected cell). Omit Blocks to combine an entire file. Use "Add", "Subtract", "Multiply", or "Divide" to perform mathematical operations; the incoming data operates on existing data.
You can use {FileCombine?} or {FileCombine!} to display the Combine Files dialog box. {FileCombine?} lets the user manipulate the dialog box, whereas {FileCombine!} relies on the macro to manipulate it.
Parameters
Parameter Description
Filename name of the file to combine
Blocks selection or selections within Filename to combine (optional)
Related topics
{FileExit}
Syntax
{FileExit <DoSave?(0|1)>}
Description
{FileExit} is the command equivalent for File Exit. It closes Corel Quattro Pro. The optional argument DoSave? indicates whether to display a save prompt before closing files with changes. Use 1, the default, to prompt for changes; 0 suppresses save prompts.
Parameters
Parameter Description
DoSave? whether to display a save prompt for modified files: no (0), yes (1); 1 is the default
{FileExtract} is the command equivalent for Tools Data Tools Extract to File. It saves part of a notebook to a separate file, leaving the original file intact. Use "Formulas" to retain formulas; use "Values" to convert formulas to values. The optional argument--"Replace", "Backup", or "Confirm"--indicates how to treat an existing file with the same name (without displaying a prompt).
You can use {FileExtract?} or {FileExtract!} to display the Extract To File dialog box. {FileExtract?} lets the user manipulate the dialog box, whereas {FileExtract!} relies on the macro to manipulate it.
Parameters
Parameter Description
Blocks selection or selections to extract
Filename name of the new file containing Blocks
Related topics
{FileImport}
Syntax
{FileImport "Filename","ASCII Text File"|"Comma and "" Delimited File"|"Only Commas"|"Parse Expert"}
Description
{FileImport} copies a text file into the active sheet of a notebook. Enter the option string that describes the type of file to import.
You can use {FileImport?} or {FileImport!} to display the Text Import dialog box. {FileImport?} lets the user manipulate the dialog box, whereas {FileImport!} relies on the macro to manipulate it.
Related topics
{FileNew}
Syntax
{FileNew <TemplateName>}
Description
{FileNew} is the command equivalent for File New. It opens a blank notebook or a notebook based on a QuickTemplate.
You can use {FileNew?} or {FileNew!} to display the New File dialog box. {FileNew?} lets the user manipulate the dialog box, whereas {FileNew!} relies on the macro to manipulate it.
FileNew only opens templates in the folder indicated in Tools Settings File Options QuickTemplates.
Example
The following macro opens a blank notebook:
{FileNew}
The following macro opens a new notebook based on the 7 Year Balloon Loan QuickTemplate:
{FileNew "7 Year Balloon Loan"}
Parameters
Parameter Description
TemplateName the name of a QuickTemplate, as indicated in the Title box in File Properties Summary.
Related topics
{FileOpen}
Syntax
{FileOpen Filename,<"Open Supporting"|"Update References"|"None ", Open as Copy 0|1>}
Description
{FileOpen} is the command equivalent for File Open. It opens the specified file.
You can use {FileOpen?} or {FileOpen!} to display the Open File dialog box. {FileOpen?} lets the user manipulate the dialog box, whereas {FileOpen!} relies on the macro to manipulate it.
Parameters
Parameter Description
Filename name of the file to open
Open as Copy Yes or No, (1 or 0), 0 is the default.
{FileRetrieve} loads a notebook into the active notebook, replacing any existing data there.
You can use {FileRetrieve?} or {FileRetrieve!} to display the Retrieve File dialog box. {FileRetrieve?} lets the user manipulate the dialog box, whereas {FileRetrieve!} relies on the macro to manipulate it.
Parameters
Parameter Description
Filename name of the file to retrieve
Related topics
{FileSave}, {FileSaveAll}, and {FileSaveAs}
Command equivalent Equivalent to...
{FileSave <Replace|Backup|Confirm>} File Save
{FileSaveAll <Replace|Backup|Confirm>} no equivalent
{FileSaveAs Filename, <Replace | Backup | Confirm>,, <FileType>} File Save As
Description
{FileSave} saves the active notebook, {FileSaveAll} saves all open notebooks, and {FileSaveAs} lets you save the active notebook under another name (Filename). The optional argument--"Replace", "Backup", or "Confirm"--indicates how to treat a previous version of the file (without displaying a prompt).
The optional <FileType> argument for {FileSaveAs} specifies the type of file to save and is equivalent to the Save File As Type option in the Save File dialog box. If you do not specify a file type, the default is "QPW v6".
You can use {FileSaveAs?} or {FileSaveAs!} to display the Save File dialog box. {FileSaveAs?} lets the user manipulate the dialog box, whereas {FileSaveAs!} relies on the macro to manipulate it.
The following table shows the available file types. For file types with abbreviated names, a short description is provided.
File Types Description
QPW v7/v8 Corel Quattro Pro for Windows, version 7.0 and 8.0
QPW v6 Corel Quattro Pro for Windows, version 6.0
QPW Corel Quattro Pro for Windows, version 1.0 and 5.0
QP/DOS Corel Quattro Pro for DOS
Excel v5/v7 Excel, Version 5.0 and Version 7.0
Excel Excel, Version 4.0
1-2-3 v4/v5 1-2-3, Version 4 and Version 5
1-2-3 v3.x 1-2-3, Version 3x
1-2-3 v2.x 1-2-3, Version 2x
1-2-3 v1.0 1-2-3, Version 1.0
1-2-3 Ed. 1-2-3, Educational Version
Paradox
dBASE IV
dBASE III
dBASE II
Text tab-delimited text
DIF VisiCalc
SYLK Multiplan
HTML Hypertext Markup Language files, Version 3 (for distribution on the Internet's World Wide Web)
Example
To close all files and save without confirmation, use this macro:
{FileSaveAll Replace}
{FileCloseAll 0}
Related topics
{FileSend}
Command equivalent Equivalent to
{FileSend <Filename>} File Send To Mail
Description
{FileSend} is the command equivalent for File Send To Mail, which lets you send notebook sheets via one of your mail systems.
Example
{FileSend MYSTATUS.WB3} sends the notebook MYSTATUS.WB3 to another user.
Related topics
{FILESIZE}
Syntax
{FILESIZE Location}
Description
{FILESIZE} calculates the number of bytes in a file previously opened using {OPEN} and places the result in Location as a value. If Location refers to cells, the result is placed in the upper left cell of the cells. If the command is successful, macro execution continues in the cell below the cell containing the {FILESIZE} command, ignoring any other commands in that cell. If {FILESIZE} fails (for example, when no file is open), macro execution continues in the cell containing the {FILESIZE} command.
Example
The following example opens the file MYFILE.TXT and places its size (in bytes) in the cell named num_bytes.
\F {OPEN "MYFILE.TXT",R}
{FILESIZE num_bytes}
{CLOSE}
num_bytes 45
Parameters
Parameter Description
Location any cell address or cell name
Related topics
{ FileVersion.Retrieve }
Syntax
{FileVersion.Retrieve Filename}
Description
Equivalent to File Version Control Retrieve Notebook.
{ FileVersion.Retrieve_Current }
Syntax
{FileVersion.Retrieve_Current}
Description
Equivalent to File Version Control Retrieve Current.
{ FileVersionSave }
Syntax
{FileVersionSave}
Description
Equivalent to File Version Control Update Current.
{FLOATCOPY}
Syntax
{FLOATCOPY UpperCell, xoffset, yoffset}
Description
{FLOATCOPY} lets you copy a floating object in the active notebook window. The item to copy is selected using {SELECTFLOAT}. The new position in {FLOATCOPY} is specified as a positive offset from a cell in the notebook.
To copy a floating chart to another notebook, specify a notebook as well as a cell for UpperCell.
Example
The following macro selects the floating chart Inserted1 and copies it to [SALES]A:C10.
{SELECTFLOAT Inserted1}
{FLOATCOPY [SALES]A:C10,0,0}
Parameters
Parameter Description
UpperCell cell containing the new upper left corner of the floating object
xoffset offset in twips from the left edge of UpperCell to the left edge of the floating object
yoffset offset in twips from the top edge of UpperCell to the top edge of the floating object
{FLOATCREATE} lets you create macro buttons, floating charts, or a draw layer objects (lines, arrows, rectangles, rounded rectangles, ellipses, or text boxes) in the active notebook window. Use {CREATEOBJECT} to create objects in dialog windows or chart windows.
All positions in {FLOATCREATE} are positive offsets from cells in the notebook containing the upper left and lower right corners of the object.
If you need to modify the floating object after creating it, change the property settings immediately after creation. It is selected then, so you will not need to click it or use {SELECTFLOAT}. You might also want to change the name at this time and document it for later use with {SELECTFLOAT}.
Example
The following macro creates a macro button that covers the cells A1..B2, then stores the name of the button in A26. The button reads Save File:
{FLOATCREATE Button,A1,0,0,C3,0,0, "Save File"}
{GETPROPERTY A26, "Object_Name"}
The following macro creates a button 50 twips to the right and 50 twips below the upper left corner of the button in the previous example. It reads Open File:
The following macro creates a floating chart that is offset 35 twips from the cells C2..E10, but the same size:
{GraphNew Chart3}
{FLOATCREATE Chart,C2,35,35,E10,35,35,"Chart3"}
The following macro creates a floating arrow over the cells B8..Dll . The arrow starts at the southwest corner of the cells, and ends with an arrowhead at the northwest corner.
{FloatCreate Arrow,A:B8,0,0,A:D11,945,45,4}
The following macro creates a floating ellipse over the cells E10..E13, then fills the ellipse with a red color.
{FloatCreate Ellipse,A:E10,0,120,A:E13,945,240}
{Setproperty Fill_Color, "255,0,0"}
Parameters
Parameter Description
Type floating object to create: Chart, Button, Line, Arrow, Rect, Rounded_Rect, Ellipse, or Text
UpperCell cell containing the upper left corner of the chart or macro button
xoffset offset in twips from the left edge of UpperCell to the left edge of the floating object
yoffset offset in twips from the top edge of UpperCell to the top edge of the floating object
LowerCell cell containing the lower right corner of the chart or macro button
xoffset2 offset in twips from the left edge of LowerCell to the right edge of the floating object
yoffset2 offset in twips from the top edge of LowerCell to the bottom edge of the floating object
Text for Chart, the named chart to display; for Button, the button text
StartCorner for Line or Arrow, a number representing the starting corner; 1 = northwest, 2 = northeast, 3 = southeast, 4 = southwest (for example, an arrow pointing up and to the right would have a StartCorner of 4)
Related topics
{FLOATMOVE}
Syntax
{FLOATMOVE UpperCell,xoffset,yoffset}
Description
{FLOATMOVE} lets you move a floating object in the active notebook window. The item to move is selected using {SELECTFLOAT}. The new position in {FLOATMOVE} is specified as a positive offset from a cell in the notebook.
To move a floating chart to another notebook, specify a notebook as well as a cell for UpperCell.
Example
The following macro selects the floating chart Inserted1 and moves it to [SALES]A:C10.
{SELECTFLOAT Inserted1}
{FLOATMOVE [SALES]A:C10,0,0}
Parameters
Parameter Description
UpperCell cell containing the new upper left corner of the floating object
xoffset offset in twips from the left edge of UpperCell to the left edge of the floating object
yoffset offset in twips from the top edge of UpperCell to the top edge of the floating object
Related topics
{FloatOrder.Option}
Command equivalent Equivalent to Format Object Order...
{FloatOrder.ToBack} ... Send To Back
{FloatOrder.Backward} ... Send Backward
{FloatOrder.ToFront} ... Bring To Front
{FloatOrder.Forward} ... Bring Forward
Description
{FloatOrder.Option} is the command equivalent for Format Object Order. It works on selected objects to arrange layers of floating charts and other floating objects in the notebook window.
{FLOATSIZE} lets you resize a floating object in the active notebook window. The item to resize is selected using {SELECTFLOAT}.
All positions in {FLOATSIZE} are positive offsets from a cell in the notebook.
Parameters
Parameter Description
UpperCell cell containing the new upper left corner of the chart or macro button
xoffset offset in twips from the left edge of UpperCell to the left edge of the floating object
yoffset offset in twips from the top edge of UpperCell to the top edge of the floating object
LowerCell cell containing the new lower right corner of the chart or macro button
xoffset2 offset in twips from the left edge of LowerCell to the right edge of the floating object
yoffset2 offset in twips from the top edge of LowerCell to the bottom edge of the floating object
Related topics
{FLOATTEXT}
Syntax
{FLOATTEXT String}
Description
{FLOATTEXT} replaces the text in the selected text box with the specified string. The text box can be on a notebook sheet or in a chart window.
Example
The following macro selects a floating text box named Text1 and replaces the text in it with "Quarterly Sales Report".
{SELECTFLOAT Text1}
{FLOATTEXT "Quarterly Sales Report"}
Parameters
Parameter Description
String string of characters used to replace text in the text box
Related topics
{FOR}
Syntax
{FOR CounterLoc,Start#,Stop#,Step#,StartLoc}
Description
{FOR} repeatedly runs a macro subroutine beginning at StartLoc, creating a macro loop. Corel Quattro Pro keeps track of how long the macro runs using CounterLoc. At the start of the loop, CounterLoc is set to Start#. Each time an iteration of the loop runs, CounterLoc is increased by Step#. When CounterLoc reaches or exceeds Stop#, execution stops.
Example
{FOR D15,1,5,1,E30} runs the subroutine beginning in cell E30 five times.
{FOR D15,1,10,2,E30} runs the subroutine five times because the counter increments by two during each iteration.
{FOR D15,1,5,0,E30} runs the subroutine continuously until you press Ctrl+Break, because adding 0 to the start value of 1 can never make the counter exceed 5.
{FOR D15,1,0,1} results in an error because no subroutine is specified.
The following macro creates "Qtr" labels for reports; the year displays above Qtr1:
\Q {; position cursor where labels should appear}
{FOR counter, 1994,1997,1,_list}
{; return to original position}
{LEFT}{END}{LEFT}
counter
_list {PUTCELL +counter}
{DOWN}
{PUTCELL "Qtr1"}{RIGHT}
{PUTCELL "Qtr2"}{RIGHT}
{PUTCELL "Qtr3"}{RIGHT}
{PUTCELL "Qtr4"}{RIGHT 2}{UP}
Parameters
Parameter Description
CounterLoc cell used to track the number of macro iterations
Start# initial value to place in CounterLoc
Stop# maximum value for CounterLoc
Step# amount added to CounterLoc after each iteration
StartLoc cell containing the subroutine to run
Related topics
{FORBREAK}
Description
{FORBREAK} cancels the subroutine run by a {FOR} command and ends the processing of {FOR}. Macro execution continues normally with the command following the {FOR} command.
If {FORBREAK} appears anywhere other than in a subroutine called by {FOR}, macro execution ends, and Corel Quattro Pro displays an error message.
{FORBREAK} is usually used in conjunction with {IF} to exit the macro if a specific condition is reached; for example, if an error condition is found.
Example
The following example shows {FORBREAK} terminating a loop used to enter names into a list. Enter STOP to stop the loop.
\F {EditGoto list_top}
{FOR counter,1,10000,1,_get_name}
_get_name {GETLABEL "Enter next name: ",name_cell}
{IF name_cell="STOP"}{FORBREAK}
{LET @CELLPOINTER("Address"),name_cell}{DOWN}
name_cell STOP
counter 4
list_top
Related topics
{FOURIER}
Syntax
{FOURIER InBlock,OutBlock,<Inverse>}
Description
{FOURIER} performs a fast Fourier transformation on cells of data. {FOURIER} is equivalent to the Fourier analysis tool.
Parameters
Parameter Description
InBlock one or more numeric cell values representing the input cells; can be real or complex numbers; the number of values in InBlock must be a power of 2 between 2 and 1024 inclusive (for example, 2, 4, 8, 16,...); if the number of values in InBlock does not equal a power of 2, pad the cells with additional zeros
OutBlock upper left cell of the output cells
Inverse 0 to perform a Fourier transformation; 1 to perform the inverse Fourier transformation; the default is 0
Related topics
{Frequency.Option}
Command Equivalent Equivalent to Tools Numeric Tools Frequency...
{Frequency.Bin_Block Block} ... Bin Cells
{Frequency.Go} ... OK
{Frequency.Reset} ... Reset
{Frequency.Value_Block Block} ... Value Cells
Description
{Frequency.Option} is the command equivalent for Tools Numeric Tools Frequency. It counts the number of cases in the value Block that fall within each interval specified in the bin Block. Use {Frequency.Bin_Block} and {Frequency.Value_Block}, then {Frequency.Go}. You can use {Frequency.Reset} before or after the other commands to clear current settings.
You can use {Frequency?} or {Frequency!} to display the Frequency Tables dialog box. {Frequency?} lets the user manipulate the dialog box, whereas {Frequency!} relies on the macro to manipulate it.
Example
The following macro counts the data in cells C1..E13 of sheet A and groups it according to the intervals given in G1..G7; frequencies display in column H.
{Frequency.Value_Block A:C1..E13}
{Frequency.Bin_Block A:G1..G7}
{Frequency.Go}
Related topics
{FTESTV}
Syntax
{FTESTV InBlock1,InBlock2,OutBlock,<Labels>}
Description
{FTESTV} performs a two-sample F-test to compare population variances. {FTESTV} is equivalent to the F-Test analysis tool.
Parameters
Parameter Description
InBlock1 the first input cells containing a column or row of numeric values
InBlock2 the second input cells containing a column or row of numeric values
OutBlock upper left cell of the output cells
Labels 1 if labels are located in the first column or row of the input cells; 0 if the input cells do not contain labels; the default is 0
Related topics
{FUNCTIONS}
Description
{FUNCTIONS} is equivalent to the Functions key, Alt+F3, which displays a list of @functions to enter in the input line.
Related topics
{GET}
Syntax
{GET Location}
Description
{GET} pauses macro execution, accepts one keystroke from the user (no carriage return is necessary), and stores the keystroke as a macro command in Location. It then continues macro execution. Any Corel Quattro Pro keystroke can be recorded with {GET} except Shift+F2, Pause, Caps Lock, Num Lock, and Scroll Lock. Unlike { ? }, the keystroke is not passed to Corel Quattro Pro.
{GET} is useful for creating macros that run in the background while the user works. It can detect each key, and restrict the actions the user performs. You can use {LOOK} with {GET} to check the typeahead buffer for user response.
Example
The following example asks users if they want to continue.
\F {RIGHT 10}
{; display msg_area in top left of screen}
{GOTO}msg_area~
_again Press Y to continue...~
{GET keystroke}
{IF keystroke<>"Y"}{BEEP2}{HOME}{QUIT}
{BEEP 4}{BRANCH _again}
keystroke
msg_area Press Y to continue...
Parameters
Parameter Description
Location cell in which to store the keystroke entered by the user
Related topics
{GETDIRECTORYCONTENTS}
Syntax
{GETDIRECTORYCONTENTS Block,<Path>}
Description
{GETDIRECTORYCONTENTS} enters an alphabetized list of file names (determined by the path and DOS wildcard specified by Path) into Block; if Path is not included, {GETDIRECTORYCONTENTS} lists all the files in the current directory. Path must contain a DOS wildcard like *.BAT or *.*.
Tips
¿ If Block is one cell, {GETDIRECTORYCONTENTS} overwrites any information beneath the cell (if it finds more than one file). To restrict the file names to specific cells, set Block to more than one cell.
Example
{GETDIRECTORYCONTENTS A2,"C:\*.*"} fills column A (starting at row 2) with a list of the files in the root directory of drive C.
{GETDIRECTORYCONTENTS A2..C7,"C:\COREL\SUITE8\*.*"} fills the cells A2..C7 with a list of the files in the Corel Quattro Pro directory on drive C. The first filename is stored in A2, the second in B2, and so on. If more than 18 files are found, the cells are only filled with the first 18.
{GETDIRECTORYCONTENTS C7,"C:\COREL\SUITE8\SAMPLES\*.W??"} fills column C (starting at row 7) with a list of the files in the COREL\SUITE8\SAMPLES directory on drive C that have file extensions beginning with W.
Parameters
Parameter Description
Block cells to enter list of files into
Path path and wildcard specifying the list (optional)
Related topics
{GETLABEL}
Syntax
{GETLABEL Prompt,Location}
Description
{GETLABEL} pauses macro execution, displays Prompt in a dialog box, and accepts keystrokes until the user chooses OK or presses Enter. At that time, Corel Quattro Pro stores the characters typed as a label in Location. Unlike {GET}, it does not accept Corel Quattro Pro's special keys (for example, Home).
Prompt can be a literal string, such as "Enter date:", or a text formula such as +B6 (which contains a label). The prompt string itself can be up to 70 characters long, and is truncated if longer. The response can be as long as 160.
If {PANELOFF} is in effect, {GETLABEL} ignores it, letting the menus, status line, and input line be viewed and updated as the input is typed. Once input is completed (indicated by Enter or choosing OK), then these portions of the display are turned off again.
Example
This example displays the label in B6 as the dialog box prompt, and then stores the result in cell D1:
{GETLABEL +B6,D1}
The following example stores the user's last name in the cell named last_cell:
\F {GETLABEL "Enter your last name:",last_cell}
last_cell
Parameters
Parameter Description
Prompt string displayed to the user as a prompt
Location cell in which to store the user's response; when {GETLABEL} is used in OLE automation, Location can also be a named variable
Related topics
{GETNUMBER}
Syntax
{GETNUMBER Prompt,Location}
Description
{GETNUMBER} is like {GETLABEL}, but accepts only a numeric value, a formula resulting in a numeric value, or the cell address or cell name of a cell returning a value. If a text value is input, ERR is entered in the cell. The prompt can be up to 70 characters long, and the response can be as long as 160 characters.
Example
The following example stores the user's age in the cell named age_cell. If a number is not entered, which the macro detects by checking to see whether age_cell contains ERR, it prompts again.
\F {GETNUMBER "Enter your age:",age_cell}
{IF @ISERR(age_cell)}{BRANCH \F}
age_cell
Parameters
Parameter Description
Prompt string displayed to the user as a prompt
Location cell in which to store the user's response; when {GETNUMBER} is used in OLE automation, Location can also be a named variable
Related topics
{GETOBJECTPROPERTY}
Syntax
{GETOBJECTPROPERTY Cell,Object.Property}
Description
{GETOBJECTPROPERTY} lets you view objects in Corel Quattro Pro without using the mouse, including objects normally not selectable (like the application title bar). Selectable objects, such as blocks and annotations, can also be studied with {GETPROPERTY}. See {SETOBJECTPROPERTY} for the syntax of Object.Property.
Example
{GETOBJECTPROPERTY A23,"Active_Notebook.Zoom_Factor"} stores the Zoom Factor property's current setting in cell A23.
{GETOBJECTPROPERTY B42,"/File/Exit.Enabled"} stores whether File Exit is operational or not in the cell B42.
Parameters
Parameter Description
Cell cell in which to store the property setting
Object name of the object to study
Property property of the object to study
Related topics
{GETPOS}
Syntax
{GETPOS Location}
Description
{GETPOS} places the position of the file pointer in Location as a value. If no file has been opened using {OPEN}, the command is ignored.
The file pointer is a number corresponding to the position at which the next character written to the file will be placed. If the file pointer is 0, the next character written to the file with {WRITE} or {WRITELN} is placed at the beginning of the file. If the file already contains information, it is overwritten, beginning at the first position in the file. After the file is written to, the file pointer is positioned immediately after the last character written. If a file is newly created, then written to for the first time, the file pointer will be the size of the file.
If {GETPOS} succeeds, macro execution continues in the cell below the cell containing the {GETPOS} command, ignoring any commands in the same cell as {GETPOS}; if {GETPOS} fails, macro execution continues in the same cell.
Example
The following example opens the text file TEST.TXT, reads in a line, and calculates the length of the line by subtracting the starting position from the ending position and subtracting 1 from the result. This adjustment is necessary because the carriage return and linefeed characters (found at the end of each line in a typical text file) are stripped away by Corel Quattro Pro when the text is read into cells. So, the calculated length is one character longer than the actual length. The text file read here was created by the macro example provided in the {WRITELN} command description.
\F {OPEN "A:TEST.TXT",R}
{GETPOS start}
{READLN input}
{GETPOS end}
{CLOSE}
{LET num_char,+(end-start)-1}
input This is a short line.
start 0
end 22
num_char 21
Parameters
Parameter Description
Location cell in which to store the retrieved value
Related topics
{GETPROPERTY}
Syntax
{GETPROPERTY Cell,Property}
Description
{GETPROPERTY} lets you study the property settings of whatever object is selected. Property is the property to view (see Property Reference for a list of properties); its setting is stored in Cell.
Example
{GETPROPERTY A23,"Text_Color"} stores the Text Color setting of the selected object in the cell A23.
{GETPROPERTY B42,"Box_Type"} stores the border style of the selected object in cell B42.
Parameters
Parameter Description
Cell cell in which to store the property setting
Property property of the selected object to study
Related topics
{GETWINDOWLIST}
Syntax
{GETWINDOWLIST Block}
Description
{GETWINDOWLIST} stores a list of the windows open on the Corel Quattro Pro desktop in Block, including dialog windows and chart windows. Windows hidden by Window Hide are not included.
If Block is one cell, {GETWINDOWLIST} overwrites any information beneath the cell (if it finds more than one window open). To restrict the window names to specific cells, set Block to more than one cell.
Example
{GETWINDOWLIST A2..C5} stores a list of open windows in the cells A2..C5. The first window name is stored in A2, the second in B2, and so on. If more than twelve windows are open, only the first twelve are stored in the cells.
Parameters
Parameter Description
Block cells to store window names in
Related topics
{GOTO}
Description
{GOTO} lets you move the selector to a specific location.
A related macro, {QGOTO}, selects the cell or cells specified as its destination, while {GOTO} moves to the cell in the upper-left corner of the specified cells.
This command is for compatibility with Corel Quattro Pro for DOS; use {EditGoto} as the command equivalent for Edit Go To.
Related topics
{GRAPH}
Description
{Graph} is equivalent to the Chart key, F11, which displays the current chart.
Related topics
{GRAPHCHAR}
Syntax
{GRAPHCHAR Location}
Description
{GRAPHCHAR} returns the key a user presses to leave a chart or to remove a message box. The character is stored at Location. This command lets you create a chart or message that functions as a menu of choices. The character returned can be used to branch or display any other data.
{GRAPHCHAR} works with {MESSAGE} to record what key the user pressed to remove a message box. It captures only characters the user can normally type into a cell; special characters such as Esc are not stored.
Example
The following example displays a message box (its contents being the_msg) and returns the character the user pressed to remove it. The key pressed is stored in cells named the_key.
\A {MESSAGE the_msg,15,15,0}
{GRAPHCHAR the_key}
the_key
the_msg Press C to continue or any other key to quit...
The next example displays a chart and waits for the user to press a key. This macro begins with the command found next to "_graphic" and assumes that the current file contains charts by the name of "line," "pie," "bar," and "area." If the user presses P, B, or A, Corel Quattro Pro displays a (predefined) pie chart, bar chart, or area chart, respectively. The macro stops playing when the user presses any key that is not P, B, or A.
the_chart bar
the_key b
_graphic {GraphView "line"}
_continue {GRAPHCHAR the_key}
{if @UPPER(the_key)="P"}{_draw "pie"}
{if @UPPER(the_key)="B"}{_draw "bar"}
{if @UPPER(the_key)="A"}{_draw "area"}
_draw {DEFINE the_chart}
{GraphView the_chart}
{BRANCH _continue}
Parameters
Parameter Description
Location cell address or the cell name where the returned character should be stored
{GraphCopy} copies the style, data, and/or annotation objects from one chart to another (within a notebook or between notebooks). It is equivalent to copying chart attributes using Edit Copy and Edit Paste Special.
You can use {GraphCopy?} or {GraphCopy!} to display the Paste Special Chart dialog box. {GraphCopy?} lets the user manipulate the dialog box, whereas {GraphCopy!} relies on the macro to manipulate it.
Parameters
Parameter Description
FromChart chart containing the style, data, or annotation objects to copy
DestChart new chart (the copy)
Style? whether to copy properties that affect the appearance of the chart: yes (1), no (0)
Data? whether to copy chart data: yes (1), no (0)
Annotations? whether to copy annotation objects: yes (1), no (0)
Related topics
{GraphDeactivate}
Description
{GraphDeactivate} deactivates a floating chart that has been activated for editing.
Example
The following macro activates a floating chart for editing, creates a rectangle in the chart, makes a copy of the rectangle, then deactivates editing.
{GraphEdit Chart1, 1}
{CreateObject Rect,147,176,416,427}
{Duplicate 269,338}
{GraphDeactivate}
Related topics
{GraphDelete}
Syntax
{GraphDelete Name}
Description
{GraphDelete} deletes the specified chart from the active notebook.
You can use {GraphDelete?} or {GraphDelete!} to display the Delete Chart dialog box. {GraphDelete?} lets the user manipulate the dialog box, whereas {GraphDelete!} relies on the macro to manipulate it.
Parameters
Parameter Description
Name name of the chart to delete
Related topics
{GraphEdit}
Syntax
{GraphEdit Name,<InPlace?(0|1)}
Description
{GraphEdit} displays the specified chart in a chart window for editing. Use the InPlace? argument to edit a floating chart on the notebook sheet.
You can use {GraphEdit?} or {GraphEdit!} to display the Edit Chart dialog box. {GraphEdit?} lets the user manipulate the dialog box, whereas {GraphEdit!} relies on the macro to manipulate it.
Example
The following macro selects the floating chart named Inserted1 and then activates its source chart (Chart1) for editing on the notebook sheet.
{SelectFloat Inserted1}
{GraphEdit Chart1,1}
Parameters
Parameter Description
Name name of the chart to edit
InPlace? whether to edit the chart in place on a notebook sheet; 0 = no, 1 = yes; the default is 0
Related topics
{GraphGallery}
Syntax
{GraphGallery ChartStyle, ColorScheme}
Description
{GraphGallery} is the command equivalent for Chart Gallery, which applies a chart style and color scheme to selected charts.
Available choices for ColorScheme are:
¿ No change Pastels
¿ Default Fire and Ice
¿ Grayscale Bright and Bold
¿ Icy Blues Color Washes
¿ Deep Reds Black and White Patterns
¿ Autumn Leaves Color Patterns
¿ Tangerine Tiled Men
You can use {GraphGallery?} or {GraphGallery!} to display the Chart Gallery dialog box. {GraphGallery?} lets the user manipulate the dialog box, whereas {GraphGallery!} relies on the macro to manipulate it.
Example
The following macro selects a 3-D Bar chart style and a "Tangerine" color scheme:
{GraphGallery "3dbar","Tangerine"}
Parameters
Parameter Description
ChartStyle the style of chart; see {GraphSettings.Type} for a list of chart types
ColorScheme the color scheme used for the chart
Related topics
{GraphNew}
Syntax
{GraphNew Name,<UseCurrentBlock?(0|1)>}
Description
{GraphNew} creates a new chart and displays it in a chart window. If UseCurrentBlock? is 1, any selected data is shown in the chart; if it is 0, {GraphNew} creates a new chart without data.
You can use {GraphNew?} or {GraphNew!} to display the New Chart dialog box. {GraphNew?} lets the user manipulate the dialog box, whereas {GraphNew!} relies on the macro to manipulate it.
Parameters
Parameter Description
Name name of the new chart
UseCurrentBlock? whether to chart the current selected cells; 0 = no, 1 = yes; the default is 0name of the new chart
{GraphSettings.Titles} is equivalent to Chart Titles, which sets the titles of the active chart (or selected floating chart or chart icon). Each argument is a string; to reset a title, use an empty string ("").
Example
The following macro command displays the chart Profit99 in a chart window and sets its main title and subtitles. The empty strings ("") indicate that there are no axis titles.
Sub title appearing below the main title of the chart
X-Axis title of the chart's x-axis
Y-Axis title of the chart's y-axis
Y2-Axis title of the chart's secondary y-axis
Related topics
{GraphSettings.Type Type,Class}
Description
{GraphSettings.Type} is equivalent to Chart Type/Layout, which lets you specify how the data in a chart is displayed. It affects the active chart (or chart icon or floating chart). Class specifies the class of chart type being used. Class can be one of six settings: Area/Line, Bar, Stacked Bar, Pie, Specialty, and Text.
Chart Type/Layout... Command equivalent
Area/Line 3-D Area {GraphSettings.Type "3D Area,Area/Line"}
Stacked Bar 100% stacked bar {GraphSettings.Type "100 stacked bar,Stacked Bar"}
Stacked Bar 100% stacked line {GraphSettings.Type "100 stacked line,Stacked Bar"}
Stacked Bar 3-D 100% stacked bar {GraphSettings.Type "3D100 stacked bar,Stacked Bar"}
Stacked Bar 3-D Stacked bar {GraphSettings.Type "3D Stacked bar,Stacked Bar"}
Stacked Bar Rotated 2-D 100% stacked bar {GraphSettings.Type "R2D100 stacked bar,Stacked Bar"}
Stacked Bar Rotated 2-D 100% stacked line {GraphSettings.Type "R2D100 stacked line,Stacked Bar"}
Stacked Bar Rotated 2-D stacked bar {GraphSettings.Type "R2D stacked bar,Stacked Bar"}
Stacked Bar Rotated 2-D stacked line {GraphSettings.Type "R2D stacked line,Stacked Bar"}
Stacked Bar Rotated 3-D 100% stacked bar {GraphSettings.Type "R3D100 stacked bar,Stacked Bar"}
Stacked Bar Rotated 3-D stacked bar {GraphSettings.Type "R3D stacked bar,Stacked Bar"}
Stacked Bar Stacked bar {GraphSettings.Type "Stacked bar,Stacked Bar"}
Stacked Bar Stacked line {GraphSettings.Type "Stacked line,Stacked Bar"}
Text Blank {GraphSettings.Type "Blank,Text"}
Text Bullet {GraphSettings.Type "Bullet,Text"}
Example
{GraphSettings.Type "3-D Pie,Pie"} make the active chart a 3-D pie chart.
Related topics
{GraphView}
Syntax
{GraphView <ChartName1,ChartName2,...>}
Description
{GraphView} is equivalent to Chart View Chart, which displays a chart (or series of charts) full-screen. {GraphView} without an argument displays the active chart (or chart icon or floating chart).
You can use {GraphView?} or {GraphView!} to display the View Chart dialog box. {GraphView?} lets the user manipulate the dialog box, whereas {GraphView!} relies on the macro to manipulate it.
Example
The following macro displays the named charts Profit90 through Profit94.
ChartName1 name of the first chart to display (optional)
ChartName2 name of the second chart to display (optional)
Related topics
{GraphWindow.Property}
Description
{GraphWindow.Property} is equivalent to right-clicking the title bar of a chart window to set its Aspect Ratio or Grid properties.
{GraphWindow.Aspect_Ratio Option} sets the aspect ratio of the active chart. Option can be one of the following settings: "35mm Slide", "Floating Chart", "Full Extent", "Printer Preview", or "Screen Slide".
{GraphWindow.Grid GridSize,DisplayGrid,SnapToGrid} sets the grid size of the active chart window. Use GridSize to specify the percent of chart window between grid points; DisplayGrid specifies whether the grid is visible; SnapToGrid specifies whether the grid is active.
Example
This macro sets up a 10 by 10 grid, displays the grid, and enables it.
{GraphWindow.Grid "10,Yes,Yes"}
{Group.Option}
Command equivalent Equivalent to
{Group.Define GroupName, StartPage, EndPage} Insert Name Group of Sheets
{Group.Delete GroupName} Insert Name Group of Sheets Delete
{Group.ResetNames} Clears all group names in the notebook; no equivalent command
Description
{Group.Option} is the command equivalent for Insert Name Group of Sheets, which creates and deletes sheet groups.
Once you have defined a sheet group, you can use {Notebook.Group_Mode "On"} to activate Group mode. Use "Off" to cancel Group mode.
You can use {Group?} or {Group!} to display the Define/Modify Group dialog box. {Group?} lets the user manipulate the dialog box, whereas {Group!} relies on the macro to manipulate it.
Related topics
{GroupObjects}
Description
{GroupObjects} is the command equivalent for Format Group. It groups selected objects in a chart window so they can be treated as one object in subsequent operations. Use {UngroupObjects} to treat them independently again.
Related topics
{HELP}
Description
{HELP} is equivalent to the Help key, F1. It displays a help topic.
{HISTOGRAM} calculates the probability and cumulative distributions for a sample population, based on a series of bins. {HISTOGRAM} is equivalent to the Histogram analysis tool.
Parameters
Parameter Description
InBlock input cells containing one or more columns or rows of numeric values; the cells must not contain labels
OutBlock upper left cell of the output cells
BinBlock set of numbers defining the bin ranges; BinBlock numbers must be in ascending order; if BinBlock is omitted, bins are distributed evenly from the minimum to the maximum values in InBlock, with the number of bins equal to the square root of the number of values in InBlock
Pareto 1 to arrange the output table in both descending frequency order and ascending BinBlock order; 0 to arrange the output table in ascending BinBlock order; the default is 0
Cum flag indicating whether to generate a column in OutBlock showing cumulative percentages: yes (1) or no (0); the default is 0
Related topics
{HLINE}
Syntax
{HLINE Distance}
Description
{HLINE} scrolls the active notebook horizontally by Distance columns. If the number is positive, it scrolls right; if negative, it scrolls left. {HLINE} does not move the selector; only the view of the notebook is altered, just as if the scroll bars were used. Use the commands {RIGHT} or {LEFT} to move the selector horizontally.
Example
{HLINE 10} scrolls the display 10 columns to the right.
{HLINE -5} scrolls the display 5 columns to the left.
Parameters
Parameter Description
Distance distance in columns to scroll the active notebook horizontally
Related topics
{HOME}
Description
{HOME} is equivalent to the Home key.
Related topics
{HPAGE}
Syntax
{HPAGE Distance}
Description
{HPAGE} scrolls the active notebook horizontally by Distance screens. If the number is positive, it scrolls right; if negative, it scrolls left. {HPAGE} does not move the selector; only the view of the notebook is altered. Use {BIGRIGHT} or {BIGLEFT} to move the selector horizontally.
Parameters
Parameter Description
Distance distance in screens to scroll the active notebook horizontally
Related topics
{IF}
Syntax
{IF Condition}
Description
{IF} operates like @IF. {IF} evaluates Condition; if it is numeric and nonzero, it is considered to be TRUE and macro execution continues in the same cell; if Condition is anything else, it is considered FALSE, and macro execution continues in the cell directly below the {IF} command. Unlike @IF, {IF} commands cannot be nested within each other.
Example
The following example says, in English, "If the value stored in gpa is greater than 0.59, run the macro _pass_student; otherwise, run the macro _fail_student."
\F {IF gpa>.59}{BRANCH _pass_student}
{BRANCH _fail_student}
If you do not want both the true and false clauses executing, be sure to include {BRANCH} or {QUIT} in the same cell as {IF}, as shown in both examples. The following example uses a string of {IF} commands to award a grade based on a test result:
\G {IF result>=.90}{BRANCH _give_a}
{IF result>=.80}{BRANCH _give_b}
{IF result>=.70}{BRANCH _give_c}
{IF result>=.56}{BRANCH _give_d}
{BRANCH _give_f}
Parameters
Parameter Description
Condition a logical expression (or the address of a cell containing a label, value, or expression)
Related topics
{IFAUTOOBJ}
Syntax
{IFAUTOOBJ ObjectExpression}
Description
{IFAUTOOBJ} is like {IF}, but instead evaulating a logical condition it expects the object expression resulting from an OLE automation object. If ObjectExpression is true, {IFAUTOOBJ} runs the macro in the same cell; otherwise, it skips to the next cell.
For more details on using {IFAUTOOBJ} and other OLE automation macro commands, Using OLE Automation Features.
Parameters
Parameter Description
ObjectExpression object expression resulting from an OLE automation object
{IFKEY}
Syntax
{IFKEY String}
Description
{IFKEY} is like {IF}, but runs the next macro command in the current cell if String is the name of a key macro command (such as {ESC} or {HOME}). Do not enclose the name stored in String in braces. For example, {IFKEY "HOME"} evaluates as true because HOME is the name of a macro command; {IFKEY "A"} evaluates as false because it is not the name of a macro command. String can be a string or a text formula.
Parameters
Parameter Description
String any macro name for a key (such as PGUP, END, GRAPH, and so on) without braces, or a string that returns a key macro name without braces
Related topics
{IMFORMAT}
Syntax
{IMFORMAT Format}
Description
{IMFORMAT} specifies how complex numbers display in the active notebook, and returns a label showing the selected format.
Example
{IMFORMAT 1} returns "x+iy"
{IMFORMAT 2} returns "x+jy"
Parameters
Parameter Description
Format flag indicating what suffix and format to use for imaginary coefficient of complex number; the default is 1; 1 = x + yi, 2 = x + yj, 3 = x + iy, 4 = x + jy
Related topics
{ImportGraphic}
Syntax
{ImportGraphic Filename}
Description
{ImportGraphic} is the command equivalent for Insert Graphics Clipart. It imports graphics files into a chart window.
You can use {ImportGraphic?} or {ImportGraphic!} to display the Insert Image dialog box. {ImportGraphic?} lets the user manipulate the dialog box, whereas {ImportImage!} relies on the macro to manipulate it.
Parameters
Parameter Description
Filename name of the bitmap or other graphics file to import
Related topics
{INDICATE}
Syntax
{INDICATE String}
Description
{INDICATE} sets the mode indicator in the lower right corner of the screen to read whatever is given as String. If String is longer than seven characters, only the first seven are used. To restore the mode indicator to its normal setting, use {INDICATE} with no arguments. To hide the mode indicator, use {INDICATE ""}.
Example
{INDICATE "Save!"} changes the indicator to read Save!.
{INDICATE " Go! "} changes the indicator to read Go! with a space preceding and following it.
{INDICATE E14} changes the indicator to E14 because cell references are ignored.
{INDICATE} restores the normal mode indicator.
Parameters
Parameter Description
String any seven-character string
Related topics
{INITIATE}
Syntax
{INITIATE AppName,Topic,ChannelLoc}
Description
{INITIATE} requests a channel of communication with the application AppName. This application must support Dynamic Data Exchange (DDE). If the request succeeds, the identification number of the conversation (DDE communication) is stored in the cell ChannelLoc. Topic can be a Corel WordPerfect document, an Excel spreadsheet, an ObjectVision form, or other DDE server-application file. If there is no specific file to communicate with in the other application, you can set Topic to System.
AppName, Topic, or both can be an empty string (""). The empty string works as a wildcard to display a list of possible conversations to choose from.
You can use {INITIATE} multiple times with the same application; if you do this, use a different ChannelLoc for each conversation. Once a channel opens, you can use {REQUEST}, {EXECUTE}, or {POKE} to communicate with the application.
When the DDE conversation is complete, use {TERMINATE} to end it. See {EXECUTE} for an example of {INITIATE}.
Parameters
Parameter Description
AppName name of the Windows application to communicate with
Topic name of the file within the Windows application to communicate with
ChannelLoc cell to contain the Channel ID number of the conversation if communication succeeds
Related topics
{INS}, {INSERT}, {INSOFF}, and {INSON}
Description
{INS} and {INSERT} toggle the Ins key on or off. {INSOFF} is equivalent to Ins off, and {INSON} to Ins on.
{InsertObject} is equivalent to Insert Object, which inserts an OLE object into the active notebook without using the Clipboard.
You can use {InsertObject?} or {InsertObject!} to display the Insert Object dialog box. {InsertObject?} lets the user manipulate the dialog box, whereas {InsertObject!} relies on the macro to manipulate it.
Example
This macro inserts a picture created in Paintbrush into the active notebook.
{InsertObject "Paintbrush Picture"}
Parameters 1
Parameter Description
Filename file that you want to link/embed as an object
DisplayAsIcon whether to display the object as an icon; 0 to show the object as it looks in the server application; 1 to display the object as an icon
Linked? whether to link to the file; 0 to not link; 1 to link; the default is 0
Parameters 2
Parameter Description
ObjectType type of object to insert (the name of an OLE server)
DisplayAsIcon whether to display the object as an icon; 0 to show the object as it looks in the server application; 1 to display the object as an icon
Related topics
{InsertPageBreak.Option}
Command equivalent Equivalent to Insert Page Break...
{InsertPageBreak.Create Row#, Column#} ... Create
{InsertPageBreak.Delete Row#, Column#} ... Delete
Description
{InsertPageBreak.Create} inserts a page break above Row# and to left of Column#.
{InsertPageBreak.Delete} deletes the current PageBreak above Row# and to left of Column#.
Related topics
{INSPECT}
Description
{INSPECT} is equivalent to the Inspect key, F12. It displays an Object Inspector for the current object.
Related topics
{Invert.Option}
Command equivalent Equivalent to Tools Numeric Tools ...
{Invert.Destination Block} ...Invert Destination
{Invert.Go} ...Invert OK
{Invert.Source Block} ...Invert Source
Description
{Invert.Option} is the command equivalent for Tools Numeric Tools Invert. It inverts a square matrix (indicated by {Invert.Source Block}) and stores the invert matrix in other cells (indicated by {Invert.Destination Block}). Use {Invert.Go} after the other two matrix-inversion command equivalents to complete the operation.
You can use this command equivalent with {Multiply.Option} to solve sets of linear equations.
You can use {Invert?} or {Invert!} to display the Matrix Invert dialog box. {Invert?} lets the user manipulate the dialog box, whereas {Invert!} relies on the macro to manipulate it.
Related topics
{LEFT} and {L}
Syntax
{LEFT <Number>} or {L <Number>}
Description
{LEFT} and {L} are equivalent to the Left Arrow key. The optional argument Number moves the selector the corresponding number of columns to the left. You can use cell references or cell names as arguments.
Example
{L}{L}{L} moves the selector left three columns.
{LEFT 6} moves the selector six columns to the left.
{LEFT D9} moves to the left the number of columns specified in cell D9.
{LEFT count} moves to the left the number of columns specified in the first cell of the cells named count.
Parameters
Parameter Description
Number any positive integer (optional)
Related topics
{LET}
Syntax
{LET Location,Value<:Type>}
Description
With {LET}, you can enter a value into Location without moving to it. {LET} enters the value or string you specify with Value in Location.
You can use the optional Type argument to specify whether to store Value as an actual number or as a string. If you specify a formula as a string, the formula is written into Location as a string, not the resulting value. For example, {LET A1,B3*23:string} stores the formula B3*23 as a label in cell A1. If you omit Type, Corel Quattro Pro tries to store the value as a numeric value; if unsuccessful, it stores the value as a string.
Location must be a cell address or cell name; you can use functions such as @CELLPOINTER as a Location in {LET} commands only if they return a cell address or cell name.
Value cannot be an @ARRAY formula. {LET} does not not enter array values. Use {PUTCELL} or {PUTCELL2} to enter array values.
You can use {LET} to invoke add-in @functions or macros contained in DLLs. Specify the add-in as Value, using this syntax for functions:
For example, this statement calls the @function MEDIAN, included in DLL Stats, with a five-item list as an argument and stores the result in Location G6:
{LET(@CELLPOINTER("address")),99} makes the value of the active cell 99.
The examples below assume A1 contains the label 'Dear, A2 contains the label 'Sir, and A3 contains the value 25. The result is shown to the right of each {LET}.
\M {LET F1,25} 25
{LET F2,A3} 25
{LET F3,+A1&""&A2} Dear Sir
{LET F4,+A1&""&A2:value} Dear Sir
{LET F5,+A1&""&A2:string} +A1&""&A2
{LET F6,+A1&A3} ERR (because A3 is a value)
Parameters
Parameter Description
Location cell in which to store the specified value
Value numeric or string value to be stored in Location
Type string or value; string (or s) stores the value or formula as a label, and value (or v) stores the actual value or value resulting from a formula (optional)
Related topics
{Link}
Syntax
{Link "string"}
Description
{Link} applies a link to the currently selected object, such as a pushbutton in a dialog or Toolbar. {Link} is not recordable, but is equivalent to right-clicking dialog or toolbar objects and choosing "Links."
Example
{Link "ON Clicked DOMACRO {filesave}"}
{Links.Option}
Command equivalent Equivalent to Edit Links ...
{Links.Change OldName, NewName} Change Link
{Links.Delete LinkName|*} (* = all links) Delete Links
{Links.Open LinkName|*} (* = all links) Open Links
{Links.Refresh LinkName|*} (* = all links) Refresh Links
Description
{Links.Option} is equivalent to commands on the Edit Links menu, which refresh, change, or delete links in the active notebook.
LinkName is the name of the file being linked to. You can set LinkName to * to affect all links in the active notebook. If LinkName is omitted, the dialog box that normally performs the operation appears (and is under macro control; use {PAUSEMACRO} to pass control to the user).
Example
{Links.Refresh *} refreshes all links in the active notebook.
The following macro displays the Open Links dialog box and lets the user select the name of a linked notebook to open.
{Links.Open}
{PAUSEMACRO}
Related topics
{LOOK}
Syntax
{LOOK Location}
Description
When Corel Quattro Pro runs a macro, it does not respond to keystrokes the user enters (except Ctrl+Break). If the user presses keys during macro execution, those keystrokes are stored in the computer's type-ahead buffer and are responded to when the macro pauses for input or ends.
{LOOK} checks this type-ahead buffer for stored keystrokes. If any are found, it places the first keystroke the user typed in Location as a macro command.
{LOOK} can be used while processing long macros to check for a keystroke that might signal the user wants to quit (see the next example).
{LOOK} does not remove the keystroke from the buffer. If a macro does nothing other than {LOOK}, the key still passes to Corel Quattro Pro when the macro ends. To remove pending keystrokes from the buffer, use {GET}.
Example
In the following example, the macro gives you 15 seconds to choose the next menu choice. If you do not, you must reenter the password. Important: Type the line to the right of _check_it with no hard returns until after {BRANCH _password}, then press Enter to insert it into one cell (the macro commands from {LOOK keystroke} to {BRANCH -password} are shown here on separate lines for readability).
\M {QGOTO}msg_area~
A. Add name{DOWN}
B. Edit name{DOWN}
C. Delete name{DOWN}
Enter choice: {RIGHT}
{ }
{LET start_time,@NOW}
_check_it {LOOK keystroke}
{IF keystroke=""}
{IF @NOW>start_time + @TIME(0,0,15)}
{BRANCH _password}
{IF keystroke<>""}{BRANCH _take_action}
{BEEP 4}
{BRANCH _check_it}
_password {; get password from user}
{GETLABEL "Enter password : ",pass}
_take_action { }
{BEEP 3}
start_time
keystroke
pass
msg_area
Parameters
Parameter Description
Location a cell in which to store a typed character
Related topics
{MACROS}
Description
{MACROS} is equivalent to the Macros key, Shift+F3, which displays a menu of macro commands to type into the input line.
Related topics
{MapExpert}
Description
{MapExpert} is the command equivalent for Insert Graphics Map. The macro has no arguments. {MapExpert} displays the first Map Expert dialog box.
Related topics
{MapNew}
Syntax
{MapNew Name,<UseBlock>}
Description
{MapNew} is the command equivalent for Insert Graphics Map.
Parameters
Parameter Description
Name name of the new map
UseBlock 1 to create the map using data in the current cells
Related topics
{MARK}
Description
{MARK} is equivalent to the Select key, Shift+F7, which lets you begin selection of cells.
Related topics
{MCORREL}
Syntax
{MCORREL InBlock, OutBlock, <Grouped>, <Labels>}
Description
{MCORREL} computes the correlation matrix between two or more data sets. {MCORREL} is equivalent to the Correlation analysis tool.
Parameters
Parameter Description
InBlock input cells containing two or more sets of numeric data arranged in columns or rows
OutBlock upper left cell of the output cells
Grouped "C" to group results by column or "R" to group results by row; the default is "C"
Labels 1 if labels are located in the first column or row of the input cells; 0 if the input cells do not contain labels; the default is 0
Related topics
{MCOVAR}
Syntax
{MCOVAR InBlock, OutBlock, <Grouped>, <Labels>}
Description
{MCOVAR} returns the covariance matrix between two or more data sets. {MCOVAR} is equivalent to the Covariance analysis tool.
Parameters
Parameter Description
InBlock input cells containing two or more sets of numeric data arranged in columns or rows
OutBlock upper left cell of the output cells
Grouped "C" to group results by column or "R" to group results by row; the default is "C"
Labels 1 if labels are located in the first column or row of the input cells; 0 if the input cells do not contain labels; the default is 0
Related topics
{MENU}
Description
{MENU} is equivalent to the Menu key (Alt or F10). This command moves the selector to the menu bar and highlights the first menu.
Related topics
{MENUBRANCH}
Syntax
{MENUBRANCH Location}
Description
{MENUBRANCH} pauses macro execution to display the custom pop-up menu stored at Location. After the user chooses an item from the menu, macro execution continues with the cell below the description of the menu choice. Often this is a {BRANCH}. The only exception is if the user presses Esc, or clicks outside the menu; in this case, the macro continues in the {MENUBRANCH} cell.
With the exception of the Esc key, a custom pop-up menu acts the same as one of Corel Quattro Pro's own menus. Users can press the arrow keys to look at each item, and can choose a menu item by either pressing Enter while highlighting it, pressing the first letter of the menu item's name, or choosing it with the mouse.
Example
The following macro displays a custom menu that offers the user three choices. If the user presses Esc, the menu is redisplayed with {BRANCH \F}.
quit_menu Continue Return Quit
Continue macro Return to Ready Leave Corel Quattro Pro
{BRANCH \F} {BRANCH _continue} {MENUBRANCH sure}
sure No Yes
Stay in Corel Quattro Pro Return to DOS
{BRANCH \F} {FileExit}
\F {MENUBRANCH quit_menu}
{BRANCH \F}
_continue
Parameters
Parameter Description
Location cells containing menu cells
Related topics
{MENUCALL}
Syntax
{MENUCALL Location}
Description
{MENUCALL} pauses macro execution and displays the custom pop-up menu stored at Location. It treats the called menu as a subroutine. After the user chooses an item from the menu, macro execution continues in the cell containing {MENUCALL}.
See {ADDMENU} and {ADDMENUITEM} for information on adding menus or menu items to the Corel Quattro Pro menu bar.
Example
The following macro uses two consecutive custom menus to let the user change search criteria for a database. It then copies records that meet the criteria to the output cells and branches to another macro to print the output cells as labels. The cell name stat references the cell in the criteria table containing A in the example; pay references the cell in the criteria table containing F.
m_status Active Retired
Active Members Retired Members
{LET stat, "A"} {LET stat, "R"}
m_paid Paid Unpaid
Dues are paid Dues are unpaid
{LET pay, "T"} {LET pay, "F"}
\M {;Choose members for label print}
{MENUCALL m_status}
{MENUCALL m_paid}
{Query.Extract}
{BRANCH print_labels}
Database Criteria Cells:
STATUS PAID
A F
Parameters
Parameter Description
Location cells containing a custom Corel Quattro Pro menu
Related topics
{MESSAGE}
Syntax
{MESSAGE Block,Left,Top,Time}
Description
{MESSAGE} displays the contents of Block in a dialog box until Time is reached; Time is a standard Corel Quattro Pro date/time serial number (decimal portion). The window appears at the screen (not the notebook) coordinates Left,Top.
The message box contains a "snapshot" of current Block contents, including all fonts, colors, and other formatting. If Block includes a floating chart, bitmap, or macro button, its image displays in the message cells.
The height and width of the message box depend on the defined width and depth of Block. If text overflows the cell it is typed into, be sure to include adjoining cells in Block. Otherwise, the message will be truncated at the edge of Block.
The message box always appears over the frontmost window, even if that window is not a notebook (for example, a chart window).
If you enter 0 for Time, Corel Quattro Pro displays the box until the user presses any key. (You can use {GRAPHCHAR} to test for which key is pressed.)
Example
This example displays a message box for 15 seconds and then displays another box indefinitely. If the user presses Y, the macro closes the notebook without saving it. If the user, presses N (which is returned in the cells the_key), the user removes the second message box.
the_key
\A {MESSAGE msg1,15,5,+@NOW+@TIME(0,0,15)}
_warning {MESSAGE msg2,15,5,0}
{GRAPHCHAR the_key}
{IF @UPPER(the_key)="Y"}{BRANCH _lose_data}
msg1 Warning! You may lose data if you continue.
msg2 Are you sure you want to continue?
Press Y to continue or any other key to cancel...
_lose_data {FileClose 0}
Parameters
Parameter Description
Block cell name or coordinates of the text and/or floating object to display in the message box
Left screen column number (counting from 0) where the top left corner of the box should appear
Top screen line number (counting from 0) where the top left corner of the box should appear
{MOVEAVG} returns a moving average for a specified Interval based on the values for the preceding periods in InBlock. {MOVEAVG} is equivalent to the Moving Average analysis tool.
Parameters
Parameter Description
InBlock input cells containing a single column or row with at least four numeric values; the cells must not contain labels
OutBlock upper left cell of the output cells
Interval number of values to include in the moving average; the default is 3
StdErrs flag indicating whether to include standard error values in the OutBlock: yes (1) or no (0); the default is 0
Related topics
{MOVETO}
Syntax
{MOVETO x,y}
Description
{MOVETO} moves all selected objects in the active window (dialog, chart, or Objects sheetg window) to the position specified by x,y. Since {MOVETO} is context-sensitive, you can use it to move controls in a dialog window or drawings in a chart window. It also moves chart icons on the Objects sheet. (Use {FLOATMOVE} to move floating objects in a notebook window.)
The coordinates x and y represent where to move the upper left corner of the object(s). Object size does not change.
Parameters
Parameter Description
x,y position to move the currently selected object(s) to in pixels
{MTGAMT} generates an amortization schedule for a mortgage. {MTGAMT} is equivalent to the Amortization Schedule analysis tool.
Parameters
Parameter Description
OutBlock upper left cell of the output cells
Rate yearly interest rate; the default is 0.12
Term number of years in the loan; the default is 30 years; can be a fractional value to designate months (for example, 3+5/12)
OrigBal original loan balance; the default is $100,000
EndBal balance at loan completion; the default is $0
LastYear last year through which the amortization period is generated; the default is equal to Term (the end of the loan); can be a fractional value to designate months (for example, 3+5/12)
{Multiply.Option} is the command equivalent for Tools Numeric Tools Multiply. It multiplies one matrix ({Multiply.Matrix_1 Block}) by another ({Multiply.Matrix_2 Block}) and stores the product in other cells ({Multiply.Destination Block}). Use {Multiply.Go} after the other matrix-multiplication command equivalents to complete the operation.
You can use this command equivalent with {Invert.Option} to solve sets of linear equations.
You can use {Multiply?} or {Multiply!} to display the Matrix Multiply dialog box. {Multiply?} lets the user manipulate the dialog box, whereas {Multiply!} relies on the macro to manipulate it.
Example
This macro multiplies cells C2..D6 by cells C18..G19 and stores the results in the cells with upper-left cell F1.
{Multiply.Matrix_1 A:C2..D6}
{Multiply.Matrix_2 A:C18..G19}
{Multiply.Destination A:F1}
{Multiply.Go}
Related topics
{NAME}
Description
{NAME} is equivalent to the Choices key, F3, which displays a list of cell names in the current notebook, if cell names exist in the notebook. (If there are no named cells, the list of cell names won't appear.)
Use {NAME} with {GOTO}.
Example,
{GOTO}{NAME}
Related topics
{NamedStyle.Option}
Command equivalent Equivalent to Format Styles...
{NamedStyle.Alignment "HorizAlignment(General | Left | Right | Center | Center Across Block), VertAlignment(Top | Center | Bottom), WrapText?(0|1), Orientation(Horizontal | Vertical)"} ... Included Properties Alignment
{NamedStyle.Font "FontName, PointSize, Bold, Italic, Underline, Strikeout"} ... Included Properties Font
{NamedStyle.Line_Drawing "LeftLine(None | Single | Double | Thick), TopLine, RightLine, BottomLine, LeftColor, TopColor, RightColor, BottomColor"} ... Included Properties Line Drawing
{NamedStyle.Numeric_Format NumericFormat} ... Included Properties Format
{NamedStyle.Protection Protect|Unprotect} ... Included Properties Protection
{NamedStyle.Shading ForegroundColor, BackgroundColor, Pattern} ... Included Properties Shading
{NamedStyle.Text_Color 0-15} ... Included Properties Text Color
Description
{NamedStyle.Option} is equivalent to Format Styles, which lets you create styles in the active notebook.
These command equivalents do not take effect until the command {NamedStyle.Define} is used to create (or modify) a style. The arguments Align? through TextColor? each specify one property to include in the style; use 1 to include the property, 0 to exclude the property.
{NamedStyle.Font} sets the new typeface and size of text in the cell. Bold, Italic, Underline and Strikeout can be "Yes" to include that type feature or "No" to omit it.
{NamedStyle.Shading} sets the shading of the cell; ForegroundColor and BackgroundColor are numbers from 0 to 15; each specifies a color on the notebook palette to use; Pattern is a string ("Blend1" through "Blend7").
You can use {NamedStyle?} or {NamedStyle!} to display the Styles dialog box. {NamedStyle?} lets the user manipulate the dialog box, whereas {NamedStyle!} relies on the macro to manipulate it.
Example
This macro creates a new style named RedNote, which makes the active cells red, and sets a new font.
{NamedStyle.Font "Courier,10,Yes,No,No,No"}
{NamedStyle.Text_Color "4"}
{NamedStyle.Define RedNote,0,0,0,0,0,1,1}
Related topics
{Navigate.Option}
Command Description
{Navigate.SelectTable} Expands selection to the table boundaries
{Navigate.Zoom2Fit} Zooms so that a table fits into the visible part of the screen
{Navigate.GoTo Up | Left | Right | Down | TopLeft | TopRight | BottomLeft | BottomRight , <Extend?(0|1)>} Go to the sides or corners of a table. When the optional Extend? argument is 1, cell selection is extended.
{Navigate.Jump Up | Left | Right | Down} Jump to the next table in a given direction, or jump to the current table boundary if in the middle of a table.
Description
{Navigate.Option} is equivalent to the navigation tools available on the Data Manipulation Toolbar. {Navigate.SelectTable} is equivalent to the SpeedSelect button on the Data Manipulation Toolbar, which expands selection from a cell or cells within a table to the entire table. {Navigate.Zoom2Fit} is equivalent to the Zoom To Fit button. {Navigate.GoTo} performs the same actions as the Top Left Of Table, Top Right Of Table, Bottom Left Of Table, and Bottom Right Of Table buttons. {Navigate.Jump} jumps to the next table or to the selected boundary of the current table.
Example
The following macro selects cell C6 in the table below, then selects the entire table that C6 belongs to, and zooms to fit the table on the page.
{SelectBlock A:C6}
{Navigate.SelectTable}
{Navigate.Zoom2Fit}
A B C D
1 Sales Expenses Profits
2 Jan 1580 700 880
3 Feb 2474 545 1929
4 Mar 2570 656 1914
5 Apr 2876 454 2422
6 May 3223 489 2734
7 Jun 2987 470 2517
8 Jul 3178 500 2678
{NEXTPANE}
Syntax
{NEXTPANE <CellAtPointer?>}
Description
{NEXTPANE} switches between the panes of a notebook window previously split using View Split Window. The optional argument CellAtPointer? specifies whether the active cell in the pane will be at the location of the selector (1) or its previous position (0). This command is equivalent to the Pane key, F6.
Parameters
Parameter Description
CellAtPointer? specifies which cell should be active when the pane switches (0 or 1, optional)
Related topics
{NEXTTOPWIN}
Syntax
{NEXTTOPWIN <Number>}
Description
{NEXTTOPWIN} is equivalent to the Next Window key, Ctrl+F6. It makes the next window active and moves the selector to it.
Parameters
Parameter Description
Number number of times to repeat the operation (optional)
Related topics
{NEXTWIN}
Syntax
{NEXTWIN <Number>}
Description
{NEXTWIN} is equivalent to Shift+F6. It makes the bottom window active and moves the selector to it. This macro is included for compatibility with Corel Quattro Pro for DOS.
Parameters
Parameter Description
Number number of times to repeat the operation (optional)
Related topics
{Notebook.Property}
Description
{Notebook.Property} is equivalent to choosing Format Notebook. Each command affects the active notebook. The next table lists the possible settings for Property. To display a description with syntax, choose that property in the following list:
Property Format Notebook option
Display Display
Group_Mode none
Macro_Library Macro Library
Palette Palette
Password none
Password_Level Password Level
Recalc_Settings Recalc Settings
System System
Zoom_Factor Zoom Factor
You can use {Notebook?} or {Notebook!} to display the Active Notebook dialog box. {Notebook?} lets the user manipulate the dialog box, whereas {Notebook!} relies on the macro to manipulate it.
Related topics
{Notebook.Display<.Option>}
{Notebook.Display<.Option>} Equivalent to Format Notebook...
{Notebook.Display.Show_VerticalScroller Yes|No} ... Display Vertical Scroll Bar
Description
{Notebook.Display.Option} is equivalent to options of the notebook property Display.
Example
This macro command hides the vertical and horizontal scroll bars of the active notebook, reveals the sheet tabs, and shows all objects.
{Notebook.Display "No,No,Yes,Show All"}
Related topics
{Notebook.Group_Mode On|Off}
Description
{Notebook.Group_Mode On|Off} activates or deactivates group mode. This command is equivalent to using the View Group Mode command (or pressing Alt+F5).
Related topics
{Notebook.Macro_Library Yes|No}
Description
{Notebook.Macro_Library Yes|No} is equivalent to options of the notebook property Macro Library. To make the active notebook a macro library, use Yes.
Related topics
{Notebook.Palette<.Option>}
{Notebook.Palette<.Option>} Equivalent to Format Notebook...
{NoteBook.Palette.Color_n.RGB value} ... Palette Edit Color
{NoteBook.Palette.Color_n. RGB value } ... Palette Edit Color
{NoteBook.Palette.Color_n. RGB value } ... Palette Edit Color
Description
{Notebook.Palette.Option} is equivalent to the notebook property Palette, which lets you set the colors of the active notebook. The arguments of {Notebook.Palette} (Color1 through Color16) each have three parts, separated by commas: RedValue, GreenValue, and BlueValue. Each part is a number from 0 to 255. You can also edit a part individually (see the second example).
Example
{Notebook.Palette.Color_3 "255,0,255"} sets the third color on the notebook palette to violet (Red 255, Blue 255).
{Notebook.Palette.Color_5.Blue "135"} sets the amount of blue in the fifth color to 135.
Related topics
{Notebook.Password Password}
Description
{Notebook.Password Password} sets the password of the active notebook. The next save operation encrypts the file on disk.
Tips
¿ Before specifying a password, set the password level using {Notebook.Password_Level}.
Related topics
{Notebook.Password_Level None|Low|Medium|High}
Description
{Notebook.Password_Level} sets the password level of the active notebook. If you specify a password level of Low, Medium, or High, you must also specify a password using {Notebook.Password}.
{Notebook.Recalc_Settings} is equivalent to options of the notebook property Recalc Settings. This command equivalent sets the recalculation options of the active notebook. Mode options are "Automatic", "Background", and "Manual". Order can be "Column-wise", "Row-wise", or "Natural". Iterations specifies the number of times formulas are recalculated before calculation is considered complete (relevant only if Order is changed, or if you use circular references).
To highlight the source of error for each cell containing NA or ERR in the active notebook, set the optional argument AuditErrors? to 1.
Related topics
{Notebook.Summary.Option}
Command Equivalent Equivalent to File Properties...
{Notebook.Summary.Title Title } Title
{Notebook.Summary.Subject Subject} Subject
{Notebook.Summary.Author Author} Author
{Notebook.Summary.Keywords Keywords} Keywords
{Notebook.Summary.Comments Comments} Comments
Description
{Notebook.Summary.Option} is equivalent to File Properties, which displays summary information about the current notebook.
You can use the following options with @COMMAND to get information about the notebook.
{Notebook.Statistics.Created}
{Notebook.Statistics.Directory}
{Notebook.Statistics.FileName}
{Notebook.Statistics.Last_Saved}
{Notebook.Statistics.Last_Saved_By}
{Notebook.Statistics.Revision_Number}
{Notebook.System Yes|No}
Description
{Notebook.System Yes|No} makes the active notebook a system notebook.
Related topics
{Notebook.Zoom_Factor 10-400}
Description
{Notebook.Zoom_Factor} is equivalent to options of the notebook property Zoom Factor, which sets the zoom factor of the active notebook (from 10% to 400%). This setting is for display only and does not affect printed output.
Related topics
{NUMOFF} and {NUMON}
Description
{NUMOFF} and {NUMON} are equivalent to Num Lock off and Num Lock on, respectively.
Related topics
{OBJECTSPAGEGOTO}
Description
{OBJECTSPAGEGOTO} displays the Objects sheet of the active notebook and is equivalent to View Objects sheet (or pressing Shift+F5 when a spreadsheet sheet is active). When the Objects sheet is active, you can use {SELECTOBJECT} to select icons, and other object commands to manipulate them.
You can use {SELECTBLOCK} to move from the Objects sheet to a spreadsheet sheet.
Related topics
{OLE.Option}
Command equivalent Equivalent to...
{OLE.ActivateAs ObjectType} Edit <OLE Object> Convert Activate As
{OLE.AutomaticResize 0|1} OLE Object properties Automatic Resizing
{OLE.AutomaticUpdate 0|1} OLE Object properites Automatic Update
{OLE.Change_Link FileName} Edit <OLE Object> Change Link
{OLE.DisplayAsIcon 0|1} Edit <OLE Object> Convert Display As Icon
{OLE.DoVerb Action} Edit <OLE Object> Play, Edit, or Open
{OLE.OpenEdit} Alt+Double-click an OLE object to open it in the server application (instead of editing it in place)
{OLE.Update} Edit <OLE Object> Update Link
Description
{OLE.Option} is equivalent to Edit <OLE Object> commands and to some options in the Object Inspector menus of OLE objects. Each command affects the selected OLE object. The type of OLE object determines what command equivalents affect it:
Linked {OLE.DoVerb}, {OLE.Change_Link}, {OLE.Update}, {OLE.Convert}, {OLE.Change_To_Picture}, {OLE.DisplayAsIcon}, and {OLE.ActivateAs}
Example
This macro selects an OLE object named Embedded1, lets the user edit the data (in the OLE server), and then converts the object into a picture (disabling the OLE link).
Normally, if an error occurs during macro execution, the macro ends and you see an error message. {ONERROR} tells Corel Quattro Pro to branch to a different location (BranchLocation) if an error is encountered and store the error message in MessageLocation for future reference. Corel Quattro Pro stores the location of the error in ErrorLocation. MessageLocation and ErrorLocation are optional. If MessageLocation is omitted, no error message will be displayed or stored.
Only one {ONERROR} command can be in effect at a time, so each time it is called, the most recent {ONERROR} replaces the previous one. If an error occurs, the {ONERROR} state is "used up" and must be redeclared. It is best to declare {ONERROR} at the very beginning of your macro, or at least before any procedure is likely to result in an error.
In general, {ONERROR} will not capture macro programming errors, such as an incorrect sequence of commands, or an attempt to call a nonexisting subroutine. Nor will it detect syntax errors within a macro itself, such as an error resulting from the incorrect use of a macro keyword.
Typical errors that {ONERROR} detects include
¿ disk errors, such as a disk drive door left open, a full disk, or failure to find a file of a given name
¿ attempts to copy to a protected cell when a notebook's protection property is enabled
¿ attempts to insert a row that would push a nonblank cell off the bottom of the notebook
Example
The following macro uses {ONERROR} by first deliberately causing an error (trying to insert a row that would push text off the bottom of the notebook), and then beeps when that error occurs.
\G {ONERROR _on_err,err_msg,err_loc}
{EditGoto A8192}
{PUTCELL "This is the end"}
{UP}
{BlockInsert.Rows C(0)R(0), "Entire"}
_on_err {BEEP 5}
err_msg
err_loc
Parameters
Parameter Description
BranchLocation first cell of the macro to run in case of an error
MessageLocation cell in which to store any error message (optional)
ErrorLocation cell in which to store the address of the cell containing the macro error (optional)
Related topics
{OnlineService}
Syntax
{OnlineService ServiceName;Arguments}
Description
Used to launches internet URL address from a QuickButton. Equivalent to Insert QuickButton Button Properties Link to URL. (Also used when clicking Help Corel Web Site.)
ServiceName A string indicating the type of online service to use.
Arguments A string indicating the command-line to pass to the service.
{OPEN}
Syntax
{OPEN Filename,AccessMode}
Description
{OPEN} establishes a connection to Filename so you can use other file-access macro commands ({READ}, {WRITE}, and so on) on it. There are five different access modes:
R (Read-Only) Allows only reading from this file, ensuring no changes are made to it. {WRITE} and {WRITELN} cannot be used with a file opened as read-only.
M (Modify) Opens an existing file for modification. All reading and writing commands can be used with a file opened for modification. You can also use this access mode to open a stream to a communications port (for example, "COM1") or a printer port (for example, "LPT1").
W (Write) Opens a new file with the name given in {OPEN}. If a file already exists with that name, the existing file is erased. All reading and writing commands can be used with a file opened for writing.
A (Append) Opens an existing file for modification. Allows writing to the selected file only, and positions the file pointer at the end of the file.
L (Locate) Opens and closes a file to locate it.
Filename's full name and access path must be given, and the entire name must be in quotes. For instance, to open and modify the file DATA.TXT in the subdirectory called FILES on drive C, use the command {OPEN "C:\FILES\DATA.TXT",M}. If any part of the access path or file name is left out, the file might not be found.
Although {OPEN} can provide access to any type of file (including .WB3 spreadsheet files), Corel Quattro Pro's file-access macro commands are designed to work only with plain text files. Using these commands with any other file type is not recommended and can result in corruption of that file. Make a backup copy of your file before using {OPEN} on it.
Once {OPEN} runs successfully, Corel Quattro Pro skips to the next row of the macro and continues executing instructions there. {OPEN Filename,R}, {OPEN Filename,M}, and {OPEN Filename,A} fail if the file is not found. {OPEN Filename,W} fails if the supplied access path or file name is invalid. If {OPEN} fails, Corel Quattro Pro continues executing commands in the same cell as the {OPEN} command. (See the third macro below for an example.) You can use {ONERROR} to trap some errors that occur in {OPEN}.
Example
The following example opens the file named MYDATA.TXT for reading. If the file does not exist in the default data directory, the command fails.
{OPEN "MYDATA.TXT",R}
The next example creates a file MYDATA.TXT on drive A for writing. If there is already a file on drive A with that name, it is erased. This command will fail only if there is no disk in drive A.
{OPEN "A:MYDATA.TXT",W}
The last example demonstrates how to do error trapping in an {OPEN} macro. When you press Ctrl+H, Corel Quattro Pro attempts to open the file C:\MYDIR\DATA.TXT. If that succeeds, the macro stops, since there are no more commands in the row below. If {OPEN} fails (meaning the file does not exist), the adjacent {BRANCH} runs. The subroutine _try_again then attempts to create the file. If that succeeds, the macro restarts, since {OPEN} should succeed now that the file has been created. If _try_again fails, probably an invalid directory path was given. Therefore, the adjacent {BRANCH} goes to _bad_dir, which displays a relevant error message with pertinent instructions.
{Optimizer.Option} is the command equivalent for Tools Numeric Tools Optimizer. It performs goal-seeking calculations and solves sets of linear and nonlinear equations and inequalities.
Constraint# refers to a constraint's order in the constraint list. Constant may be a value or a cell containing a value. The Value for Target_Value may also be a value or a cell. Use {Optimizer.Solve} after the other commands to calculate the solution.
To save an Optimizer model, use {Optimizer.Model_Cell Cell} {Optimizer.Save_Model}. To load a model, use {Optimizer.Model_Cell Cell}{Optimizer.Load_Model}
You can use {Optimizer?} or {Optimizer!} to display the Optimizer dialog box. {Optimizer?} lets the user manipulate the dialog box, whereas {Optimizer!} relies on the macro to manipulate it.
Example
The following macro sets up an Optimizer problem designed to maximize the formula in D6 by varying cells B8..B10. Seven constraints limit the solution. All options have been changed from their default settings. T2 and G13 are the upper-left cells of the report selections.
{Optimizer.Solution_cell A:D6}
{Optimizer.Solution_goal Max}
{Optimizer.Variable_cells A:B8..A:B10}
{Optimizer.Add 1,"A:D8..A:D8",<=,"1000"}
{Optimizer.Add 2,"A:B8..A:B8",>=,"100"}
{Optimizer.Add 3,"A:B9..A:B9",>=,"100"}
{Optimizer.Add 4,"A:B10..A:B10",>=,"100"}
{Optimizer.Add 5,"A:D8..A:D8",>=,"500"}
{Optimizer.Add 6,"A:D9..A:D9",<=,"900"}
{Optimizer.Add 7,"A:D10..A:D10",<=,"110000"}
{Optimizer.Max_Time 50}
{Optimizer.Max_Iters 300}
{Optimizer.Precision 5E-05}
{Optimizer.Linear 1}
{Optimizer.Show_Iters 1}
{Optimizer.Estimates Quadratic}
{Optimizer.Derivatives Central}
{Optimizer.Search Conjugate}
{Optimizer.Detail_Reporting A:T2..A:T2}
{Optimizer.Answer_Reporting A:G13..A:G13}
{Optimizer.Solve}
Related topics
{Order.Option}
Command equivalent Equivalent to ...
{Order.Backward} Format Object Order Send Backward
{Order.Forward} Format Object Order Bring Forward
{Order.ToBack} Object Order Send to Back
{Order.ToFront} Format Object Order Bring to Front
Description
{Order.Option} is equivalent to Format Object Order, which reorders overlapping objects in a chart or dialog window. Each command affects selected objects in the active window.
Related topics
{Outline.Option}
Description
{Outline.AutoOutline} Creates an outline automatically on the current pane/page. Equivalent to Tools Outline Auto Outline.
{Outline.Group} Groups rows or columns. If the cells are not an entire row or column, whichever one contains the most elements (rows or columns) will be grouped. Equivalent to Tools Outline Group.
{Outline.Ungroup} Ungroups rows or columns. If the cells are not an entire row or column, whichever one contains the most elements (rows or columns) will be ungrouped. If the cells do not span the ENTIRE group, only those rows/columns that are inside the cells will be ungrouped. Equivalent to Tools Outline Ungroup.
{Outline.UngroupAll} Destroys all groups on the current pane/page. Equivalent to Tools Outline Ungroup All.
{Outline.Expand} Expands a collapsed group of rows or columns. If the cells are not an entire row or column and are inside a group, whichever one contains the most elements (rows or columns) and is inside a current group, will be expanded. Equivalent to Tools Outline Expand Group.
{Outline.Collapse} Collapses an expanded group of rows or columns. If the cells are not an entire row or column and are inside a group, whichever one contains the most elements (rows or columns) and is inside a current group will be collapsed. Equivalent to Tools Outline Collapse Group.
{Outline.Hide 0|1} Either hides or shows the outline in the current pane/page. Equivalent to Tools Outline Show Outline.
{Outline.Summary Above|Below, Left|Right} Sets whether the summary will be above or below for row-based groups, and left or right for column based groups. Equivalent to Tools Outline Options.
{Outline.ToLevel Rows|Columns, Level} Collapses or expands a group or rows or columns at a specific level. Equivalent to clicking in the panel on the side or top of the notebook.
{Page.Property}
Description
{Page.Property} is the command equivalent for Format Sheet. Each command affects the active sheet(s). The next table lists the possible settings for Property. To display a property description with syntax, choose the property in the following list:
Property Format Sheet option
Conditional_Color Conditional Color
Default_Width Default Width
Display Display
Name Name
Protection Protection
Tab_Color Tab Color
Zoom_Factor Zoom Factor
You can use {Page?} or {Page!} to display the Active Sheet dialog box. {Page?} lets the user manipulate the dialog box, whereas {Page!} relies on the macro to manipulate it.
Related topics
{Page.Conditional_Color<.Option>}
{Page.Conditional_Color<.Option>} Equivalent to Format Sheet...
{Page.Conditional_Color.Enable Yes|No} ... Conditional Color Enable
{Page.Conditional_Color.ERR_Color 0-15} ... Conditional Color ERR Color
{Page.Conditional_Color.Greatest_Normal_Value Value} ... Conditional Color Greatest Normal Value
{Page.Conditional_Color.Normal_Color 0-15} ... Conditional Color Normal Color
{Page.Conditional_Color.Smallest_Normal_Value Value} ... Conditional Color Smallest Normal Value
Description
{Page.Conditional_Color.Option} is equivalent to thesheet property Conditional Color, which makes cells change text color (based on the value in the cell). Each color specified in these commands is a number from 0 to 15, corresponding to which color of the notebook palette to use (1 through 16).
Example
The following macro makes negative values red, values greater than 10,000 green, ERR cells cyan, and positive values less than 10,000 black (assuming the default notebook palette is used).
{Page.Conditional_Color "Yes,0,10000,4,3,5,7"}
Related topics
{Page.Default_Width Width}
Description
{Page.Default_Width Width} is equivalent to the sheet property Default Width. It sets the default column width of the active sheet. Width is the new column width in twips (a twip is 1/1440th of an inch).
Example
{Page.Default_Width "720"} makes the default column width a half inch (720 twips).
Related topics
{Page.Display<.Option>}
{Page.Display<.Option>} Equivalent to Format Sheet...
{Page.Display.Option} is equivalent to the sheet property Display, which sets the display of zeros, borders, and grid lines. The arguments of {Page.Display} (which sets all options of the Display property in one command) use the same syntax as those in the {Page.Display.Option} commands. All {Page.Display} arguments take Yes|No string values.
Example
The following macro displays zero values on the sheet, but hides borders and grid lines.
{Page.Display "Yes,No,No,No,No"}
Related topics
{Page.Name NewName}
Description
{Page.Name NewName} is equivalent to the sheet property Name. It sets the name of the active sheet to NewName.
Related topics
{Page.Protection<.Option>}}
{Page.Protection<.Option>} Equivalent to Format Sheet...
{Page.Protection} is equivalent to the sheet property Protection. It enables or disables cell and object protection on the active sheet.
Related topics
{Page.Tab_Color "Red, Green, Blue, UseRGB?"}
Description
{Page.Tab_Color} changes the tab color of the active sheet; Red, Green, and Blue are integers from 0 to 255.
Related topics
{Page.Zoom_Factor 10-400}
Description
{Page.Zoom_Factor} is equivalent to the sheet property Zoom Factor (and the View Zoom command), which sets the zoom factor of the active sheet (from 10% to 400%). This setting is for display only and does not affect printed output.
Related topics
{PageViewGoto}
Description
Switches from either the Objects Sheet or the sheet in Draft mode to Page View. Equivalent to View Page.
Related topics
{PANELOFF}
Description
{PANELOFF} disables normal display of menus and prompts during macro execution when Corel Quattro Pro's Macro Suppress-Redraw property is set to None. It can significantly speed up execution for macros that use keystrokes to walk through menus, since it saves Corel Quattro Pro the time normally needed to draw its menus on the screen. Its effect is canceled by Corel Quattro Pro once the macro stops executing, so you need not worry about locking macro users out of the menus. To cancel its effect during macro execution, use {PANELON}.
{PANELOFF} does not disable menus created by {MENUCALL} and {MENUBRANCH} or subroutine calls that use menus or dialog boxes. Use this command with {WINDOWSOFF} to completely disable normal screen updating.
Related topics
{PANELON}
Description
{PANELON} enables display of menus and prompts that have been disabled with {PANELOFF}. {PANELON} has no effect if used without an accompanying {PANELOFF}. Therefore, it can be used repeatedly with no ill effects.
Use this command with {WINDOWSON} to completely restore normal screen updating.
Related topics
{ParseExpert.Option}
Description
The following commands correspond to the QuickColumns features accessed through Data Data Tools QuickColumns.
Command equivalent Equivalent to Data Data Tools QuickColumns...
{ParseExpert.ApplyFormatting 0|1} Equivalent to Tools Data Tools QuickColumns Options Apply Formatting to spreadsheet.
{ParseExpert.ColumnWidths 0|1} Equivalent to Tools Data Tools QuickColumns Options Set spreadsheet column widths.
{ParseExpert.ConsecutiveAsOne 0|1} Equivalent to Tools Data Tools QuickColumns Options Treat consecutive delimiters as one when Data Type is set to "Delimited".
{ParseExpert.DataType Fixed|Delimited} Equivalent to Tools Data Tools QuickColumns Options Data Type.
{ParseExpert.DelimiterType Space|Tab|Comma|CommaQuote|Other} Equivalent to Tools Data Tools QuickColumns Options Delimited when Data Type is set to "Delimited"
{ParseExpert.Go} Equivalent to Tools Data Tools QuickColumns Parse.
{ParseExpert.IgnoreNonConformingRows 0|1} Equivalent to Tools Data Tools QuickColumns Options Ignore nonconforming rows when Data Type is set to "Fixed".
{ParseExpert.InputBlock InputBlock} Equivalent to Tools Data Tools QuickColumns Source Block when InputType is set to Block instead of File.
{ParseExpert.InputFile Filename} Equivalent to Tools Data Tools QuickColumns Filename when InputType is set to File instead of Block.
{ParseExpert.InputType Block|File} Equivalent to Tools Data Tools QuickColumns Source.
{ParseExpert.JoinBrokenLines 0|1} Equivalent to Tools Data Tools QuickColumns Options Join broken lines at, when Data Type is set to "Fixed".
{ParseExpert.LineLength Number} Equivalent to Tools Data Tools QuickColumns Options Join broken lines at ??? lines, when Data Type is set to "Fixed".
{ParseExpert.LoadSettings} Equivalent to Tools Data Tools QuickColumns Load Settings.
{ParseExpert.OtherDelimiter DelimiterChar} Equivalent to Tools Data Tools QuickColumns Options Other when Data Type is set to "Delimited".
{ParseExpert.OutputBlock OutputBlock} Equivalent to Tools Data Tools QuickColumns Destination Block.
{ParseExpert.PageLength Number} Equivalent to Tools Data Tools QuickColumns Options Set page length to ??? lines.
{ParseExpert.PageLengthEnabled 0|1} Equivalent to Tools Data Tools QuickColumns Options Set page length to.
{ParseExpert.Restore} Equivalent to Tools Data Tools QuickColumns Restore.
{ParseExpert.SaveSettings} Equivalent to Tools Data Tools QuickColumns Save Settings.
{ParseExpert.SettingsFile Filename} Equivalent to Tools Data Tools QuickColumns Save Settings - the file itself..
{ParseExpert.Skip1stChar 0|1} Equivalent to Tools Data Tools QuickColumns Options Skip 1st Character when Data Type is set to "Fixed".
{ParseExpert.TextQualifier SingleQuote|DoubleQuote|None} Equivalent to Tools Data Tools QuickColumns Options Text Qualifier when Data Type is set to "Delimited".
{ParseExpert.ValueQualifier SingleQuote|DoubleQuote|None} Equivalent to Tools Data Tools QuickColumns Options Value Qualifier when Data Type is set to "Delimited".
{Parse.Option}
Command Description
{Parse.Create} Use to build the format line.
{Parse.EditLine} Lets you specify a new format line.
{Parse.Go} Use after setting up input and output cells and creating a format line.
{Parse.Input Block} Indicates the cells to parse.
{Parse.Output Block} Indicates the cells to hold parsed data.
{Parse.Reset} Clears previous settings.
Description
{Parse.Option} breaks long text strings into data fields according to a format line. This command is the equivalent of choosing Quattro Pro--DOS in Tools Settings Macro Slash Key, then clicking / Tools Parse.
{Parse.Create} and {Parse.EditLine} act on the active cells.
Example
The macro in the next figure selects text cells, builds a format line in the first line of the selected cells, identifies the format line and text as the parse input cells, specifies an output cells, and performs the parse:
11 1968 Davis, John Harrisburg, PA {Parse.Output A:A11}
12 1972 Lee, Elizabeth New York, NY {Parse.Go}
To use {Parse.EditLine}, follow the macro with a {CLEAR} macro command, then the string for the new format line, and a {CR} macro, as shown in the following example:
{PasteFormat} is equivalent to Edit Paste Special, which lets you paste data in a specific format (for example, an OLE object) into a notebook. Use LinkType to specify the paste format.
Example
{PasteFormat Bitmap} pastes the data in the Clipboard as a bitmap into the active notebook.
You can use {PasteFormat?} or {PasteFormat!} to display the Paste Special dialog box. {PasteSpecial?} lets the user manipulate the dialog box, whereas {PasteSpecial!} relies on the macro to manipulate it.
Parameters
Parameter Description
LinkType format to paste object as
Related topics
{PasteLink}
Description
{PasteLink} is equivalent to using Edit Paste Special to set up a DDE link to another application.
{PasteSpecial} is equivalent to using Edit Paste Special to paste certains aspects of Corel Quattro Pro data from the Clipboard.
You can use {PasteSpecial?} or {PasteSpecial!} to display the Paste Special dialog box. {PasteSpecial?} lets the user manipulate the dialog box, whereas {PasteSpecial!} relies on the macro to manipulate it.
Example
The following macro pastes properties, formula cells, and numbers from the Clipboard, and skips any blank cells.
{PasteSpecial Properties, Formula Cells,"",Number cells,"","",NoBlanks,""}
Parameters
Parameter Description
Properties Properties to paste properties from Clipboard; "" otherwise
Formula Cells Formula cells to paste from Clipboard, "" otherwise
Number Cells Number cells to paste from Clipboard, "" otherwise
Formula Values Pastes formula cells as values, "" otherwise
Transpose Switches the position of entries (data listed in columns is placed in rows and vice versa), "" otherwise
NoBlanks Avoids pasting blank cells from Clipboard; "" otherwise
Cell_Comments Pastes cell comments; "" otherwise
Related topics
{PAUSEMACRO}
Description
{PAUSEMACRO} is used with {DODIALOG} or a command equivalent invoked with ! to pause the macro so that the user can "finish up" whatever dialog box is displaying. Once the user finishes using the dialog box (by choosing OK, or canceling it), macro execution resumes with any macro commands following the {PAUSEMACRO}.
Use {PAUSEMACRO} only when a dialog box is displaying, Corel Quattro Pro is in FIND mode (using Tools Data Tools Notebook Query), or Corel Quattro Pro is in INPUT mode (using {RestrictInput.Option}). Otherwise, the macro pauses indefinitely.
Example
The following macro displays the Edit Copy Cells dialog box, sets the From edit field to A1, activates the To edit field, and then waits for the user to complete the copy operation. Once the user finishes the dialog box, the macro beeps and moves down a cell.
_copy_a1 {BlockCopy!}
{ALT+F}
A1
{ALT+T}
{PAUSEMACRO}
{BEEP}{DOWN}
Related topics
{PGDN} and {PGUP}
Syntax
{PGDN <Number>},{PGUP <Number>}
Description
{PGDN} and {PGUP} are equivalent to PgDn and PgUp, respectively. Use Number to specify how many times the operation is repeated; for example, {PGUP 7} is equivalent to pressing PgUp seven times.
Parameters
Parameter Description
Number any positive integer or address of a cell containing a positive integer (optional)
Related topics
{PlayPerfectScript}
Syntax
{PlayPerfectScript Filename}
Description
{PlayPerfectScript} is the command equivalent for Tools Macro Play PerfectScript.
Parameters
Parameter Description
Filename name of a PerfectScript macro file to run
Related topics
{POKE}
Syntax
{POKE DDEChannel, Destination, DataToSend}
Description
{POKE} sends information to an application that supports Dynamic Data Exchange (DDE). This application is identified by DDEChannel. The type of application determines what Destination is; the destination could be cells in Excel or a bookmark in Word for Windows. DataToSend refers to cells containing the information to send. You must use the command {INITIATE} to open a channel of conversation before you can use {POKE} (this also determines the value of DDEChannel).
Example
This example starts a conversation with TASKLIST.OVD, which is a file open in ObjectVision. It sets the ObjectVision field Task to the label stored in new_task, and unchecks the Completed check box. Then the new task is inserted into the task list. The command block contains an ObjectVision command not available in Corel Quattro Pro:
DDEChannel channel ID number of the application to send information to
Destination location in the application that receives the information being sent
DataToSend cells containing the information to send to the application
Related topics
{Preview}
Description
{Preview} is equivalent to File Print Preview, which lets you preview a printout onscreen.
Related topics
{Print.Option}
Description
{Print.Option} is equivalent to the menu items in the following list. To display specific command equivalents, choose one of the following.
Command equivalents for...
File Page Setup
File Page Setup Named Settings
File Print
File Page Setup Options
The command equivalent {Print.PrintReset} resets print settings in all the dialog boxes displayed by these commands.
You can use {Print?} or {Print!} to display the Spreadsheet Print dialog box. {Print?} lets the user manipulate the dialog box, whereas {Print!} relies on the macro to manipulate it.
File Page Setup Named Settings Command Equivalents
File Page Setup Named Settings command equivalent Equivalent to File Page Setup Named Settings...
{Print.Create NamedSetting} ... Add,
... Update
{Print.Delete NamedSetting} ... Delete
{Print.Use NamedSetting} ... Use
Description
These command equivalents are equivalent to File Page Setup Named Settings. NamedSetting is the named print setting to affect. To update an existing named setting, use {Print.Create}. {Print.Delete} removes a named setting from the active notebook. {Print.Use} sets the current print settings to those stored under the name.
Related topics
File Page Setup Command Equivalents
File Page Setup command equivalent Equivalent to File Page Setup...
{Print.Options_Dialog} Displays the Page Setup dialog.
{Print.Print_To_Fit Yes|No} ... Print Scaling Print to Fit
{Print.Right_Margin Value} ... Print Margins Right
{Print.Scaling 1-1000} ... Print Scaling Scaling
{Print.Top_Margin Value} ... Print Margins Top
Description
These command equivalents are equivalent to File Page Setup. When specifying a margin, the default measurement system is used (set in the Windows Control Panel). To use a specific measurement system, place in (for inches) or cm (for centimeters) after the new margin setting (see the example). The new setting is converted into the default measurement system.
Example
This macro sets the top and bottom margins to three centimeters, specifies landscape orientation, and sets the paper size to Legal.
{Print.Top_Margin "3 cm"}
{Print.Bottom_Margin "3 cm"}
{Print.Orientation Landscape}
{Print.Paper_Type "Legal 8 1/2 x 14 inch"}
Related topics
File Print Command Equivalents
File Print command equivalent Equivalent to File Print...
{Print.All_Pages Yes|No} ... Notebook
{Print.Area Notebook | Selection | Current Sheet} ... specify Notebook, Sheet, or a Selection
{Print.Block Block} ... Selection
{Print.Copies Value} ... Copies
{Print.DoPrint} ... Print
{Print.DoPrintGraph} ... Print (selected chart)
{Print.GroupCopies 0|1} ...
Will "collate" copies when set to zero, and "group" copies when set to 1.
These command equivalents are equivalent to File Print (for the commands available for print options, see File Page Setup Options.) {Print.DoPrint} prints the active notebook (or active chart) using current print settings. {Print.DoPrintGraph} provides a quick way to print a chart. If a floating chart is selected, {Print.DoPrintGraph} prints the chart being shown; if a chart icon is selected, {Print.DoPrintGraph} prints the chart represented by that icon; if a chart window is active, {Print.DoPrintGraph} prints the chart shown.
Example
This macro selects an icon on the Objects sheet named Report3 and prints the chart it represents.
{OBJECTSPAGEGOTO}
{SELECTOBJECT Report3}
{Print.DoPrintGraph}
This macro prints pages 7 through 12 of a document. The print selection is A3..C234.
These command equivalents are equivalent to the options available in the Spreadsheet Print Options dialog box (click File Page Setup Options). {Print.Between_Page_Formatting} and {Print.Lines_Between_Pages} control the amount of space left between notebook sheets (if the print selection spans multiple sheets).
{Print.Between_Block_Formatting} and {Print.Lines_Between_Blocks} control space between the selections that make up a noncontiguous print selection.
Example
This macro specifies that three lines should be printed between each notebook sheet (if the print selection spans multiple sheets), and that row and column borders should print.
{PTTESTM} performs a paired two-sample Student's t-Test for means. Each value from InBlock1 is paired with a value from InBlock2. InBlock1 and InBlock2 must have the same number of values.
{PTTESTM} is equivalent to the t-Test analysis tool.
Parameters
Parameter Description
InBlock1 the first input cells containing a column or row of numeric values
InBlock2 the second input cells containing a column or row of numeric values
OutBlock upper left cell of the output cells
Labels 1 if labels are located in the first column or row of the input cells; 0 if the input cells do not contain labels; the default is 0
Alpha significance level of the test; the default is 0.05
Difference hypothetical mean difference; the default is 0
{PTTESTV} performs a Student's t-Test using two indepependent (rather than paired) samples with unequal variances. {PTTESTV} is equivalent to the t-Test analysis tool.
Parameters
Parameter Description
InBlock1 the first input cells containing a column or row of numeric values
InBlock2 the second input cells containing a column or row of numeric values
OutBlock upper left cell of the output cells
Labels 1 if labels are located in the first column or row of the input cells; 0 if the input cells do not contain labels; the default is 0
Alpha significance level of the test; the default is 0.05
Related topics
{PUT}
Syntax
{PUT Location,Column#,Row#,Value<:Type>}
Description
{PUT}, like {LET}, copies a value to a particular cell. However, instead of placing the value directly in the specified cell, {PUT} copies Value into the cell that is offset Column# columns and Row# rows into Location.
{PUT} processes Value the same way {LET} does, including the use of :string (or :s) and :value (or :v). If neither of these two optional arguments is supplied, {PUT} tries to store the value as a numeric value; if unsuccessful, it stores the value as a label.
The values for Column# and Row# can be any number between 0 and one less than the number of columns or rows within Location, respectively. A value of 0 implies the first column or row, 1 implies the second, and so on. If Column# or Row# exceeds the number of columns or rows in the cells, the macro stops. ({ONERROR} cannot trap this error.)
Example
Each of the following examples assumes cell A41 contains the value 25, the selection named numbers has been defined as A44..B50, and data is a cell containing the value 295.
{PUT numbers,1,4,A41:value} copies the value 25 into the cell at the intersection of the second column and the fifth row of the cell numbers (cell B48).
{PUT numbers,1,5,A41:s} copies the string "A41" into the cell at the 2nd column and the 6th row of the cell numbers (cell B49).
{PUT numbers,1,6,data} copies the contents of the cell data to the 2nd column and 7th row of numbers (cell B50). If there is no selection named data, this example instead places a label ("data") into cell B50.
Parameters
Parameter Description
Location cells within which Value will be stored, either as a value or label, as specified by Type
Column# number of columns into the specified cells to store Value
Row# number of rows into the specified cells to store Value
Value string or numeric value
Type string or value; string (or s) stores the value or formula as a label, and value (or v) stores the actual value or value resulting from a formula (optional)
Related topics
{PUTBLOCK}
Syntax
{PUTBLOCK Data,<Block>,<Date?(0|1)>}
Description
{PUTBLOCK} lets you quickly enter the same value, label, or formula in multiple cells. Data is a string or value to place in Block. If Block is not specified, the currently selected cells are used. Block can be noncontiguous; if so, be sure to enclose it in parentheses. If Data is a formula containing relative addresses, those addresses are adjusted automatically.
Example
{PUTBLOCK "Quarter 1",A..D:A1} enters the label Quarter 1 in cells A:A1 through D:A1.
{PUTBLOCK 1990,A..D:B1} enters the value 1990 in cells A:B1 through D:B1.
{PUTBLOCK "+A1",C3..C12) enters the formula +A1 in C3, +A2 in C4, and so on.
{PUTBLOCK "11/01/94", (A:D3,B:D3,C:D3,D:D3),1} enters the date 11/01/94 in cell D3 of sheets A through D.
Parameters
Parameter Description
Data entry to type
Block cells to type Data in (optional)
Date? whether to enter Data as a date (1) or a label (0)
Related topics
{PUTBLOCK2}
Syntax
{PUTBLOCK2 Data,<Block>}
Description
{PUTBLOCK2} enters the same value, label, or formula in multiple cells like {PUTBLOCK} but parses date formats automatically and requires a formula prefix before numeric values. Data is a string or value to place in Block. If Block is not specified, the currently selected cells are used. Block can be noncontiguous; if so, be sure to enclose it in parentheses. If Data is a formula containing relative addresses, those addresses are adjusted automatically.
Example
{PUTBLOCK2 "Quarter 1",A..D:A1} enters the label Quarter 1 in cells A:A1 through D:A1.
{PUTBLOCK2 +1990,A..D:B1} enters the value 1990 in cells A:B1 through D:B1.
{PUTBLOCK2 "+A1",C3..C12) enters the formula +A1 in C3, +A2 in C4, and so on.
{PUTBLOCK2 "11/01/94", (A:D3,B:D3,C:D3,D:D3)} enters the date 11/01/94 in cell D3 of sheets A through D.
Parameters
Parameter Description
Data entry to type
Block cells to type Data in (optional)
Related topics
{PUTCELL}
Syntax
{PUTCELL Data,<Date?(0|1)>}
Description
{PUTCELL} is an easy way to store information in the active cell.
Example
{PUTCELL "Peggy Danderhoff"} stores Peggy Danderhoff as a label in the active cell.
{PUTCELL 45067} stores the number 45067 as a value in the active cell.
{PUTCELL "@SUM(A1..A27)"} stores the formula @SUM(A1..A27) in the active cell.
{PUTCELL "11/01/94",1} stores the date 11/01/94 in the active cell
Parameters
Parameter Description
Data string to type into the active cell
Date? whether to enter Data as a date (1) or a label (0)
Related topics
{PUTCELL2}
Syntax
{PUTCELL2 Data}
Description
{PUTCELL2} stores information in the active cell like {PUTCELL} but parses date formats automatically and requires a formula prefix before numeric values.
Example
{PUTCELL2 "Peggy Danderhoff"} stores Peggy Danderhoff as a label in the active cell.
{PUTCELL2 +45067} stores the number 45067 as a value in the active cell.
{PUTCELL2 "@SUM(A1..A27)"} stores the formula @SUM(A1..A27) in the active cell.
{PUTCELL2 "11/01/94"} stores the date 11/01/94 in the active cell
Parameters
Parameter Description
Data string to type into the active cell
Related topics
{QGOTO}
Description
{QGOTO} displays and selects the specified cells. This command is equivalent to the Go To key, F5. You can also use the command equivalent {EditGoto Block}. A related command, {GOTO}, moves to the upper-left cell of a destination cells, but does not select the cells.
Related topics
{QUERY}
Description
{QUERY} is equivalent to the Query key, F7, which repeats the Tools Data Tools Notebook Query operation performed.
Related topics
{Query.Option}
Command equivalent Equivalent to Tools Data Tools Notebook Query...
{Query.Assign_Names} ... Field Names
{Query.Criteria_Table Block} ... Criteria Table
{Query.Database_Block Block} ... Database Cells
{Query.Delete} ... Delete
{Query.Extract} ... Extract
{Query.Locate} ... Locate
{Query.Output_Block Block} ... Output Cells
{Query.Reset} ... Reset
{Query.Unique} ... Extract Unique
Description
{Query.Option} is equivalent to Tools Data Tools Notebook Query, which lets you set up a Corel Quattro Pro database and search for records in that database. {Query.Locate} enters FIND mode and stays under macro control until {PAUSEMACRO} is used or {Query.EndLocate}, which exits FIND mode.
You can use {Query?} or {Query!} to display the Notebook Data Query dialog box. {Query?} lets the user manipulate the dialog box, whereas {Query!} relies on the macro to manipulate it.
Example
The following macro sets up database cells and criteria table (A2..G37 and H1..H2), searches for records using the criteria table, sets up an output cells at J2..P2, and copies any records found there.
{Query.Database_Block A2..G37}
{Query.Criteria_Table H1..H2}
{Query.Locate}
{Query.EndLocate}
{Query.Output_Block J2..P2}
{Query.Extract}
Related topics
{QuickCorrect}
Syntax
{QuickCorrect Yes|No}
Description
{QuickCorrect} is the command equivalent for Tools QuickCorrect. It replaces common spelling errors and mistyped words; it can also be used to automatically expand abbreviations. {QuickCorrect Yes} activates the QuickCorrect feature; {QuickCorrect No} turns it off.
Performs QuickFilter operations on cells. Equivalent to Tools QuickFilter, and then manipulating the QuickFilter buttons on a column header. If there are no optional args, then it is the same as "Show All." You can have 2, 5, or 7 optional args.
Example:
{QuickFilter.Go A:A1}
Equivalent to "Show All". Flushes ALL filters associated with Column A
{QuickFilter.Go A:B5;equal to""}
Equivalent to "Blanks". Filters all rows out except for those with blanks in Column B.
{QuickFilter.Go A:F24;not equal to""}
Equivalent to "Non Blanks". Filters out all rows except for those without blanks in Column F.
Parameters
Parameters Description
OpCode# "equal to", or "not equal to", "greater than", "less than", "greater than or equal to", "less than or equal to", "begins with", "does not begin with", "ends with", "does not end with", "contains", "does not contain".
Arg# can be numeric, or a string. Wildcards are not valid.
Conditional# AND or OR
Related topics
{QuickFilter.Toggle}
Syntax
{QuickFilter.Toggle <Block>}
Description
Turns on/off QuickFilters for the current cells. Equivalent to Tools QuickFilter.
Related topics
{QuickFilter.TopGo}
Syntax
{QuickFilter.TopGo CellReference; <OpCode; Arg>}
Description
Performs QuickFilter operations on cells. Equivalent to Tools QuickFilter, and then manipulating the QuickFilter buttons on a column header. If there are no optional args, it is the same as "Show All."
Example:
{QuickFilter.TopGo A:C51;top value;10}
Equivalent to Top Ten Values. Filters out all rows except for those that contain the top 10 values in column C.
{QuickFilter.TopGo A:E17;bottom percent;23}
Equivalent to Bottom 23 Percent. Filters out all rows except for those that contain the bottom 23% in column E.
{QUIT} ends all macro execution, and returns control of Corel Quattro Pro to the user.
Use {QUIT} in conjunction with {IF}, {LOOK}, {MENUBRANCH}, or {MENUCALL} to end a macro under user control.
Example
The following macro displays a menu that has a "Quit" option, which returns the user to Ready mode.
quit_menu Continue Quit
Keep going Quit to Ready mode
{BRANCH \G} {QUIT}
\G {MENUBRANCH quit_menu}
Related topics
{RANDOM}
Description
{RANDOM} generates cells of random values drawn from a selected distribution. It is equivalent to the Random Number analysis tool. {RANDOM} has a different format for the following distribution types:
Uniform every value has an equal probability of being selected.
Normal has the qualities of a symmetrical, bell-shaped curve.
Bernoulli has two possible outcomes, failure or success, represented by 0 and 1.
Binomial represents the distribution of successful outcomes in a given number of independent Bernoulli trials.
Poisson the distribution of values in any interval depends on the length of the interval and the constant Lambda, the expected number of occurrences in an interval
Patterned a pattern of repeated values and sequences.
Discrete every value in designated cells has a specified probability of being selected (the cumulative probabilities equal 1).
When the Distribution argument equals 7, {RANDOM} generates random values drawn from a discrete distribution.
Parameters
Parameter Description
OutBlock upper left cell of the output cells
Columns a value indicating the number of random number sets to generate; default is the number of columns in OutBlock
Rows a value indicating the number of rows of random numbers to generate for each column
7 indicates discrete distribution
Seed starting number for the random number generation algorithm
InBlock one or more numeric cell values representing the input cells, which contain a range of values and their probabilities, each in a separate column
{RANKPERC} returns the ordinal and percent rank of each value in InBlock. {RANKPERC} is equivalent to the Rank and Percentile analysis tool.
Parameters
Parameter Description
InBlock input cells containing one or more columns or rows of numeric values
OutBlock upper left cell of the output cells
Grouped "C" to group results by column or "R" to group results by row; the default is "C"
Labels 1 if labels are located in the first column or row of the input cells; 0 if the input cells do not contain labels; the default is 0
Related topics
{READ}
Syntax
{READ #Bytes,Location}
Description
{READ} reads #Bytes bytes of characters from a file previously opened using {OPEN} (starting at the current position of the file pointer), and stores them as a label in Location. The file is left unchanged, and the file pointer moves to the position following the last character read. (See {GETPOS} for a discussion of the file pointer.)
{READ} is similar to {READLN}, except for two differences. While {READLN} reads one line of characters (terminated by a carriage-return/linefeed pair), {READ} reads the precise number of characters specified. This lets you read, for example, fields within a record rather than an entire record. The second difference is that while {READLN} strips out the carriage-return/linefeed pair at the end of a line, {READ} manipulates these as if they were no different from other characters. If you use {READ} to read a file created by {WRITELN}, you will see two graphics characters at the end of each string read. These are the carriage return and linefeed characters. {READ} is best used only in conjunction with {WRITE}, or when you know the text file structure in detail.
If {READ} succeeds, macro execution continues in the cell below the cell containing the {READ} command; if {READ} fails, macro execution continues in the same cell.
Example
This macro opens a text file containing a phone directory database, and reads a name and phone number from the third record. The macro that created this text file is shown in the description of {WRITE}:
\L {OPEN "A:PHONEDIR.PRN",R}
{SETPOS rec_length*(rec_number-1)}
{READ name_length,name}
{READ phone_length,phone}
{CLOSE}
rec_number 3
rec_length 28
name_length 14
phone_length 12
name Hall, Sue Ann
phone 617-555-5678
Parameters
Parameter Description
#Bytes number of bytes of characters to read from a file
Location cell in which to store the characters read
Related topics
{READLN}
Syntax
{READLN Location}
Description
{READLN} is like {READ}, but instead of using a number of bytes to determine the amount of text to read, {READLN} reads forward from the current file pointer location up to and including the carriage-return/linefeed at the end of the line. Unlike {READ}, it does not read the carriage return/linefeed into the cell. (See {GETPOS} for a discussion of the file pointer.)
Use {READ} to read lines from a record-structured file, where the lines are of uniform length. {READLN} can read the contents of a file one row at a time, making formatting of the data easier than {READ}.
Like the other file-access macros, if {READLN} fails, the macro continues execution in the current cell. If it is successful, the macro skips to the row below, and execution continues there. {ONERROR} can be used to trap disk and file errors, such as a disk drive door being left open.
Example
The following macro opens the text file TEST.TXT, reads in a line, and calculates the length of the line by subtracting the starting position from the ending position, then subtracting 1 from the result. This adjustment is necessary because the carriage-return and linefeed characters found at the end of each line in a typical text file are stripped away by Corel Quattro Pro when the text is read into cells. The macro that created the file TEST.TXT is shown in the description of {WRITELN}.
\M {OPEN "A:TEST.TXT",R}
{GETPOS start}
{READLN input}
{GETPOS end}
{CLOSE}
{LET num_char,+(end-start)-1}
start 0
end 22
num_char 21
input This is a short line.
Parameters
Parameter Description
Location cell in which to store the characters read
Related topics
{RECALC}
Syntax
{RECALC Location,<Condition>,<Iteration#>}
Description
{RECALC} causes Corel Quattro Pro to recalculate a specified portion of the notebook in a row-by-row order. This is different from normal recalculation, where Corel Quattro Pro recalculates the entire notebook in natural order; that is, before a formula calculates, each cell it references is recalculated first.
With the optional Condition argument, you can tell Corel Quattro Pro to recalculate formulas in cells repeatedly until the specified condition is met. You can also supply Iteration# to specify the maximum number of times to recalculate formulas trying to satisfy Condition. To use Iteration#, Condition must also be supplied.
{RECALC} is useful for rapid recalculation of specified parts of a notebook, particularly when the notebook is so large that global recalculations would significantly slow your work.
{RECALC} overrides the recalculation method specified for the notebook, enforcing row-by-row recalculation. If all the formulas reference only cells above, or to the left in the same row, the notebook will be correctly calculated. If there are references to cells to the left and below, you must use {RECALCCOL}. If there are references to cells below or to the right in the same row as your formula, you must use {CALC} to recalculate the entire notebook.
{RECALC} displays the results of recalculation.
If there are formulas within the cells being recalculated that depend on formulas outside of the cells, they might not evaluate correctly. Make sure Location encompasses all the cells referenced by formulas within the cells.
Parameters
Parameter Description
Location cells to recalculate
Condition condition to be met before recalculation is halted (optional)
Iteration# maximum number of times to recalculate Location trying to meet Condition (optional)
Related topics
{RECALCCOL}
Syntax
{RECALCCOL Location,<Condition>,<Iteration#>}
Description
{RECALCCOL} recalculates the specified portion of a notebook in column-by-column order. It is similar to {RECALC}, which recalculates row by row. See {RECALC} for information on when {RECALCCOL} is appropriate and when you need to use {CALC} instead.
Parameters
Parameter Description
Location cells to recalculate
Condition condition to be met before recalculation is halted (optional)
Iteration# maximum number of times to recalculate Location trying to meet Condition (optional)
Related topics
{RefreshScreenOn} and {RefreshScreenOff}
Description
{RefreshScreenOn} and {RefreshScreenOff} turn on or off the repainting of Corel Quattro Pro behind an active dialog box.
{Regression.Y_Intercept Compute|Zero} ...Regression Y Intercept
Description
{Regression.Option} is the command equivalent for Tools Numeric Tools Regression. It performs a regression analysis to show the relationship between a set of independent variables and a dependent variable.
{Regression.Dependent} indicates the dependent-variable cells. {Regression.Independent} defines the independent variables. In {Regression.Independent}, Block can be noncontiguous with one variable to a column. The dependent and independent selections must all have the same number of rows.
{Regression.Output} indicates where to store the table of regression results. {Regression.Y_Intercept} specifies whether to compute the Y-intercept, or set it to zero. You can use {Regression.Reset} to clear all settings. Use {Regression.Go} after the other command equivalents to perform the regression analysis. If data changes within the independent or dependent data selections, use {Regression.Go} again to calculate a new regression table.
You can use {Regression?} or {Regression!} to display the Linear Regression dialog box. {Regression?} lets the user manipulate the dialog box, whereas {Regression!} relies on the macro to manipulate it.
Example
The following macro sets these data selections: Independent, B2..D16; Dependent, F2..F16. The last statement performs the regression analysis and stores the results in the cells with upper-left cell H2.
{Regression.Independent A:B2..A:D16}
{Regression.Dependent A:F2..A:F16}
{Regression.Output A:H2}
{Regression.Go}
Related topics
{REQUEST}
Syntax
{REQUEST DDEChannel,DataToReceive,DestBlock}
Description
{REQUEST} gets information specified by DataToReceive from applications that support Dynamic Data Exchange (DDE). This information is stored in DestBlock. DataToReceive is a string representing the location of the data to receive in the other application. In Corel Quattro Pro, this could be cells such as A2..A7 or a property such as "(Application.Display)". If requesting a property, the property must be enclosed in parentheses. You must use {INITIATE} to open a channel of communication and obtain the value DDEChannel before using {REQUEST}.
If your conversation is not within a specific topic (in other words, you opened the channel using the command {INITIATE AppName,"System",DDEChannel}), you can use the following strings in DataToReceive, depending on the application:
Arguments for DataToReceive
String Purpose
"SysItems" A listing of all strings you can use with DataToReceive. You can use this command first to view other choices offered by AppName.
"Topics" A listing of all topics open. For example, a list of open documents under Word for Windows.
"Status" The current status of the application. For example, READY in Excel or EDIT in Corel Quattro Pro when a cell is being edited.
"Formats" A list of all Clipboard formats supported by the application or DDE link.
"Selection" A list of all items currently selected in the application. For example, in Excel cells A3..A47 could be selected.
Example
This macro gets the major and minor version numbers of GroupWise, which is already running.
{RESIZE} resizes all selected objects in the active window (dialog or chart window).
Parameters
Parameter Description
x a nd y xy coordinates of the new upper left corner, in pixels
NewWidth the new width, in pixels, of the object or group
NewHeight the new height, in pixels, of the object or group
VertFlip? 1 if the object or group is flipped vertically from its previous position
HorizFlip? 1 if the object or group is flipped horizontally from its previous position
Related topics
{ResizeToSame}
Description
{ResizeToSame} is equivalent to Format Resize To Same, which lets you resize selected objects in the dialog window to the same size as the first object selected.
Related topics
{RESTART}
Description
{RESTART} changes the current subroutine to the starting routine (or the main routine) by removing all preceding For loops and subroutine calls.
{RESTART} is typically used for error handling. If an application is already nested to near the maximum number of levels and a severe error occurs that requires the macro to end, {RESTART} ensures that additional subroutine calls can be made. If you use the {RESTART} command often, you may want to use {BRANCH} to run subroutines.
Related topics
{RestrictInput.Option}
Command equivalent Equivalent to...
{RestrictInput.Enter Block} No equivalent menu item
{RestrictInput.Exit} Any operation that ends INPUT mode
Description
{RestrictInput.Enter} enters INPUT mode and stays under macro control until {PAUSEMACRO} is used or {RestrictInput.Exit}, which exits INPUT mode.
{RestrictInput.Option} confines selector movement to specific cells of unprotected cells.
You can use {RestrictInput?} or {RestrictInput!} to display the Restrict Input dialog box. {RestrictInput?} lets the user manipulate the dialog box, whereas {RestrictInput!} relies on the macro to manipulate it.
Related topics
{RETURN}
Description
{RETURN} ends the executing subroutine and returns control to the macro that called it. If the macro executing is not a subroutine, execution stops.
A {RETURN} command at the end of a subroutine is optional, since a macro automatically returns from a subroutine when it reaches a blank cell or a cell containing a value. {RETURN} is usually used with {IF} to return to the main macro if a certain condition is met.
See {Subroutine} for an example of using {RETURN}.
Related topics
{RIGHT} and {R}
Syntax
{RIGHT <Number>} or {R <Number>)
Description
{RIGHT} and {R} are equivalent to the Right Arrow key. The optional argument Number moves the selector the corresponding number of columns to the right. You can also use cell references or cell names as arguments.
Example
{RIGHT}{RIGHT} moves right two columns.
{R 6} moves right six columns.
{RIGHT D9} moves right the number of columns specified in cell D9.
{RIGHT count} moves right the number of columns specified in the first cell of the selection named count.
Parameters
Parameter Description
Number any positive integer (optional)
Related topics
{ROWCOLSHOW}
Syntax
{ROWCOLSHOW Block,Show?,Row or Col,FirstPane?}
Description
{ROWCOLSHOW} lets you hide or reveal rows and columns (it is equivalent to the cell property Reveal/Hide). Show? specifies whether to reveal (1) or hide (0). Row or Col specifies whether to affect rows (1) or columns (0). Block contains the rows or columns to affect. FirstPane? is used when the active window is split into panes (using View Split Window). To affect the columns or rows in the left or top pane, set FirstPane? to 1; to affect rows or columns in the right or bottom pane, set FirstPane? to 0.
Example
{ROWCOLSHOW A:A..B,1,0,1} reveals columns A and B on sheet A.
{ROWCOLSHOW A:1..7,0,1,1} hides rows 1 through 7 on sheet A.
{ROWCOLSHOW A:1..7,1,1,0} reveals rows 1 through 7 on sheet A. If the window is split, the rows are revealed in the right or bottom pane.
Parameters
Parameter Description
Block cells containing rows or columns to hide or show
Show? 1 to reveal rows or columns; 0 to hide rows or columns
Row or Col 1 to reveal or hide a row; 0 to reveal or hide a column
FirstPane? 1 to affect rows or columns in left or top window pane; 0 to affect them in the right or bottom window pane
Related topics
{ROWHEIGHT}
Syntax
{ROWHEIGHT Block,FirstPane?,Set/Reset,Size}
Description
{ROWHEIGHT} provides two ways to change the height of a row or rows (it is equivalent to the cell property Row Height). The rows to change are specified by Block. FirstPane? is used when the active window is split into panes (using View Split Window). To resize the rows in the left or top pane, set FirstPane? to 1; to resize the rows in the right or bottom pane, set FirstPane? to 0.
Set/Reset specifies how to change the height. To set a row height, use this syntax: {ROWHEIGHT Block, FirstPane?, 0, Size}
Size is the new row height, in twips. The maximum height is ten inches (14,400 twips).
To reset a row to the default height (determined by font sizes in the row), use this syntax: {ROWHEIGHT Block, FirstPane?, 1}
Example
{ROWHEIGHT A:1..A:2,1,0,1440} sets the height of rows 1 and 2 (on sheet A) to one inch (1,440 twips).
{ROWHEIGHT A:1..A:2,0,0,2160} sets the height of rows 1 and 2 (on sheet A) to one and a half inches (2,160 twips). If the window is split, the top or left pane is affected.
{ROWHEIGHT A:5,1,1} resets the height of row 5 (on sheet A) to the default height.
Parameters
Parameter Description
Block cells containing rows to resize
FirstPane? 1 to resize rows in left or top window pane; 0 to resize rows in right or bottom window pane
Set/Reset 0 to set the row height; 1 to reset the row height
Size new height (in twips) if setting size; not needed if resetting size
Related topics
{SAMPLE}
Syntax
{SAMPLE InBlock,OutBlock,Type,Rate}
Description
{SAMPLE} returns a periodic or random sample from values in InBlock. {SAMPLE} is equivalent to the Sampling analysis tool.
Parameters
Parameter Description
InBlock one or more numeric or cell values representing the input cells
OutBlock upper left cell of the output cells
Type "P" to specify periodic sample; "R" to specify random sampling
Rate a value indicating a sampling rate; if Type = "P", Rate indicates the periodic interval used for sampling; if Type = "R", Rate indicates the number of samples
Related topics
{Scenario.Option}
Command equivalent Equivalent to Tools Scenario Edit...
{Scenario.AddCells <Block>} ... Add
{Scenario.Capture ScenarioName} ... Capture
{Scenario.CaptureArea Area,Block} ... Modify Capture Area
{Scenario.Close} Closes a Scenario Manager session; no equivalent command
{Scenario.UseGroup GroupName} ... Group Management
Description
{Scenario.Option} is the command equivalent for Tools Scenario New. It lets you change values in a model, saving the conditions and results for different scenarios. {Scenario.Open} must be used prior to using other {Scenario.Option} commands; use {Scenario.Close} when you are finished using the Scenario Manager. For {Scenario.AddCells} and {Scenario.RemoveCells}, Block defaults to the currently selected cells. For {Scenario.Report}, Block defaults to the first empty sheet in the notebook.
You can use {Scenario?} or {Scenario!} to display the Scenario Manager dialog box. {Scenario?} lets the user manipulate the dialog box, whereas {Scenario!} relies on the macro to manipulate it.
Example
The following macro captures the base scenario and two additional scenarios for a car loan.
{Scenario.Open}
{Scenario.Capture Base Scenario}
{Scenario.Update}
{SelectBlock A:F4}
{PutCell ".096"}
{SelectBlock A:C5}
{PutCell "60"}
{Scenario.Find}
{Scenario.Highlight 1,7,9}
{Scenario.Capture APR96-60}
{Scenario.Update}
{SelectBlock A:F4}
{PutCell ".085"}
{SelectBlock A:C5}
{PutCell "48"}
{Scenario.Find}
{Scenario.Highlight 1,7,9}
{Scenario.Capture APR85-48}
{Scenario.Update}
{Scenario.Report 0,1,0}
{FileSaveAs "C:\COREL\SUITE8\DATA\CARS.WB3"}
{Scenario.Close}
Related topics
{ScenarioExpert}
Description
{ScenarioExpert} is the command equivalent for Tools Scenario New. The macro has no arguments. {ScenarioExpert} displays the first Scenario Expert dialog box.
Related topics
{SCROLLOFF} and {SCROLLON}
Description
{SCROLLOFF} and {SCROLLON} are equivalent to Scroll Lock off and Scroll Lock on, respectively.
Related topics
{Search.Option}
Command equivalent Equivalent to Edit Find And Replace...
{Search.Block Block} ... Cellss
{Search.Case Any|Exact} ... Case Sensitive
{Search.Direction Column|Row} ... Columns First
{Search.Find String} ... Find
{Search.Look_In Condition | Formula | Value} ... Look In
{Search.Match Part|Whole} ... Match Whole
{Search.Next} ... Next
{Search.Previous} ... Previous
{Search.Replace} ... Replace button
{Search.ReplaceAll} ... Replace All
{Search.ReplaceBy String} ... Replace edit field
{Search.Reset} ... Reset
Description
{Search.Option} is equivalent to Edit Find And Replace, which searches for strings in the active sheet. Use {Search.ReplaceBy} to specify the replacement string; {Search.Replace} replaces the string.
You can use {Search?} or {Search!} to display the Find And Replace dialog box. {Search?} lets the user manipulate the dialog box, whereas {Search!} relies on the macro to manipulate it.
Example
The following macro searches the active sheet for 1993 in formulas and replaces it with 1994.
{Search.Reset}
{Search.Block ""}
{Search.Look_In Formula}
{Search.Match Part}
{Search.Find "1993"}
{Search.ReplaceBy "1994"}
{Search.ReplaceAll}
Related topics
{SelectAll}
Description
{SelectAll} is the command equivalent for Edit Select All.
{SELECTBLOCK}
Syntax
{SELECTBLOCK Block, <ActiveCell>}
Description
{SELECTBLOCK} lets you select a contiguous or noncontiguous selection within the active notebook. The noncontiguous selections must be enclosed in parentheses.
Example
{SELECTBLOCK A4..B23} selects the cells A4..B23 in the active notebook window.
{SELECTBLOCK (A:A1..A:B12,B:B13..B:C34)} selects the noncontiguous selections A:A1..A:B12, B:B13..B:C34.
Parameters
Parameter Description
Block coordinates of the cell(s) to select
ActiveCell address of the cell within the cells to make active
Related topics
{SELECTFLOAT}
Syntax
{SELECTFLOAT ObjectID1<,ObjectID2,...>}
Description
With {SELECTFLOAT} you can select floating objects in the active notebook window using their names. (To find the name of an object, view it and study its Object Name property.) Use {SELECTOBJECT} to select objects in a chart or dialog window.
Example
{SELECTFLOAT "Button1"} selects the macro button in the the active notebook window with the object name Button1.
Parameters
Parameter Description
ObjectIDx name of the notebook object(s) to select
Related topics
{SELECTOBJECT}
Syntax
{SELECTOBJECT ObjectID1<,ObjectID2,...>}
Description
With {SELECTOBJECT} you can select objects in the active window using their ID numbers or names. (To find the ID number of an object, view it and study its Object ID property. Its name is stored in its Name property.) Since {SELECTOBJECT} is context-sensitive, you can select controls in a dialog window, drawings in a chart window, or icons in the Objects sheet.
Example
{SELECTOBJECT 2,5,7} selects the objects in the active window with the IDs 2, 5, and 7.
Parameters
Parameter Description
ObjectIDx identification number or name of the object(s) to select
Related topics
{Series.Option}
Command equivalent Equivalent to Chart Series...
{Series.Data_Range SeriesNumber | "XaxisLabelSeries" | "LegendSeries", Block <,CreateIfNotExist? (0|1)>} ... Number or X-Axis or Legend
{Series.Option} is equivalent to Chart Series and options in a series Object Inspector, which creates or deletes chart series.
When you manipulate a series using command equivalents, the changes are not made until the command {Series.Go} is used. In all the commands, SeriesNumber is the number of the series to affect (1 for the first series, 2 for the second, and so on).
{Series.Data_Range} changes the values of an existing series. Block is the new cells that the series should take values from. If you are not sure whether the series exists, set CreateIfNotExist? to 1. Then the series will be created if it does not already exist. You can also use {Series.Data_Range} to set the x-axis series (use "XAxisLabelSeries") or set the legend series (use "LegendSeries").
{Series.Delete} removes an existing series. Set AndAllSeriesFollowing? to 1 if you also want to remove all series following SeriesNumber.
{Series.Insert} creates a new series. The series is inserted at the position specified by SeriesNumber. Block refers to the cells containing the new series' data.
{Series.Label_Range} sets up the labels for each value in a series. Block refers to the cells containing the labels. If you are not sure whether the series exists, set CreateIfNotExist? to 1. Then the series will be created if it does not already exist.
{Series.Legend} sets the legend text for a series (LegendText is the new text).
You can use {Series?} or {Series!} to display the Chart Series dialog box. {Series?} lets the user manipulate the dialog box, whereas {Series!} relies on the macro to manipulate it.
You can add series to a floating chart using {ADDSERIES}.
Example
The following macro creates a chart named Profit99 with two series. The series values are in A:A1..A27 and A:C1..C27. The series labels are in A:B1..B27 and A:D1..D27. The x-axis is stored in A:E1..E27.
{GraphNew Profit99}
{GraphEdit Profit99}
{Series.Data_Range 1,A:A1..A27,1}
{Series.Data_Range 2,A:C1..C27,1}
{Series.Label_Range 1,A:B1..B27}
{Series.Label_Range 2,A:D1..D27}
{Series.Data_Range "XAxisLabelSeries",A:E1..E27}
{Series.Go}
The following macro inserts a new series between the two series in the last example.
{SeriesManager.Define Name, List, Repeating?(0|1), Value1 <,Value2, Value3,...>} Data Fill Define QuickFill Create (List series)
{SeriesManager.Go Name, Rows | Columns | Tabs, Block} Equivalent to using the SpeedFill button on the Main Toolbar
{SeriesManager.Remove Name} Eidit Fill Define QuickFill Delete
{SeriesManager.Rename OldName, NewName} Edit Fill Define QuickFill Rename
Description
{SeriesManager.Option} is the command equivalent for Data Fill Define QuickFill. Use {SeriesManager.Define Name, Formula,...} to create a formula series and {SeriesManager.Define Name, List,...} to create a list series.
You can use {SeriesManager?} or {SeriesManager!} to display the Define Fill Series dialog box. {SeriesManager?} lets the user manipulate the dialog box, whereas {SeriesManager!} relies on the macro to manipulate it.
Example
The following macro creates a SpeedFill series named "First of Month" that consists of the first day of each month in 1995, then fills a column starting at A:A2 with the dates.
{SeriesManager.Define "First of Month", List, No, "01/01/95", "02/01/95", "03/01/95", "04/01/95", "05/01/85", "06/01/95", "07/01/95", "08/01/95", "09/01/95", "10/01/05", "11/01/95", "12/01/95"}
{SETGRAPHATTR} lets you quickly set the properties of all selected objects in the active chart window. If one of the arguments specified in the {SETGRAPHATTR} command is not appropriate for an object, that argument is ignored.
Each color (FillColor, BkgColor, and BorderColor) is in quotes, and specified in RGB format. For FillStyle, use any of the strings for that option in the appropriate Object Inspector.
BoxType specifies the new border style for the object; use any Border Style property string included in a chart Object Inspector.
Parameters
Parameter Description
FillColor new fill color of the selected object(s)
BkgColor new background color of the selected object(s)
FillStyle new fill style of the selected object(s)
BorderColor new border color of the selected object(s)
BoxType new border style of the selected object(s)
Related topics
{SETLCID}
Syntax
{SETLCID <LocaleID>}
Description
{SETLCID} sets the locale ID to the default locale ID or to one specified by LocaleID. The locale ID is a fixed number which specifies language, separator character, and a variety of other international settings; use {SETLCID} to ensure that the automation controller is using the default ID or the ID of a specific target object.
For more details on using {SETLCID} and other OLE automation macro commands, Using OLE Automation Features.
Parameters
Parameter Description
LocaleID value for a locale ID
{SETMENUBAR}
Syntax
{SETMENUBAR <SystemDefinition>}
Description
{SETMENUBAR} lets you specify which menu system displays on the menu bar. SystemDefinition refers to cells containing the new menu system definition.
You can use {SETMENUBAR} without an argument to restore the default Corel Quattro Pro menu system.
Example
{SETMENUBAR "A3..C324"} makes the system defined in A3..C324 the active menu system.
Parameters
Parameter Description
SystemDefinition cells containing a menu system definition
Related topics
{SETOBJECTPROPERTY}
Syntax
{SETOBJECTPROPERTY Object.Property,Value}
Description
{SETOBJECTPROPERTY} can change the property settings of many Corel Quattro Pro objects. Selectable objects such as blocks and annotations can also be changed using {SETPROPERTY}. {SETOBJECTPROPERTY} can affect:
¿ Dialog controls. Use this syntax to specify a control to manipulate in a dialog window: [Notebook]DialogName:ObjectID.Property. [Notebook] is optional. For example, the following macro sets the Fill Color property of the control Rectangle1 in the dialog ColorPick to red:
¿ Chart objects. Use the same syntax as for dialog controls, but substitute the name of the chart in place of DialogName. For example, the following macro changes the size of a rectangle named ColorPick in the chart 1QTR92:
¿ Menu items. Use the syntax MenuPath.Property. See the description of {ADDMENU} for the syntax of MenuPath.. For example, the following macro disables File Save in the active menu system:
{SETOBJECTPROPERTY "/File/Save.Disabled", "Yes"}
Parameters
Value is the new setting for the property. You can also substitute another instance of Object.Property for this argument to copy property settings between objects. For example, this macro copies the text color of the active cells to the text color of A23:
See Property Reference for a list of properties you can use.
Parameters
Parameter Description
Object object to alter property of
Property property to alter
Value new property setting (or another instance of Object.Property to copy the new setting from)
Related topics
{SETPOS}
Syntax
{SETPOS FilePosition}
Description
{SETPOS} moves the file pointer of a file previously opened using {OPEN} to the value FilePosition. (See {GETPOS} for a discussion of the file pointer.) FilePosition refers to the offset, in number of bytes, where you want to position the file pointer. Therefore, the first position in the file is numbered 0, not 1.
If no file is open when {SETPOS} is encountered (or some other problem occurs), macro execution begins with the next command in the same cell as {SETPOS}. If {SETPOS} succeeds, the rest of that cell's commands are ignored, and execution continues in the next row of the macro.
For an example using {SETPOS}, see {READ}.
Parameters
Parameter Description
FilePosition the number of bytes into a file to set the file pointer to
Related topics
{SETPROPERTY}
Syntax
{SETPROPERTY Property,Setting}
Description
{SETPROPERTY} alters the properties of the active object (use {SELECTBLOCK}, {SELECTFLOAT}, or {SELECTOBJECT} to select objects).
To find Property, view the object and use the name of the control that sets the property. If the control name is more than one word, connect the words with underscores (_). See Property Reference for a list of properties you can use.
Example
{SETPROPERTY "Text_Color", "3"} sets the selected cells' Text Color property to the fourth color on the notebook palette (the first color is 0).
The following macro selects the macro button named PushButton1 and renames it Button1.
name_float {SELECTFLOAT "PushButton1"}
{SETPROPERTY "Object_Name","Button1"}
Parameters
Parameter Description
Property string representing the property to change
Setting string representing the setting to apply to the property
Related topics
{SHIFT}
Syntax
{SHIFT+Key <Number>}
Description
{SHIFT} emulates holding down the Shift key while pressing a keystroke. It is handy for selecting cells, portions of a text box, or parts of a formula being edited.
You can combine {ALT}, {CTRL}, and {SHIFT}. For example, {CTRL+SHIFT+S} is equivalent to pressing Ctrl+Shift+S, which displays a list of styles to apply to the selected cells.
Example
{SHIFT+DOWN 5} emulates pressing the Shift key while moving down five cells.
{EDIT}{END}{SHIFT+LEFT 3} edits the active cell, and selects the last three characters of the cell contents.
Parameters
Parameter Description
Key keyboard macro command (PGUP, DOWN, and so on)
Number number of times to repeat the operation (optional)
Related topics
{Slide.Option}
Command equivalent Action
{Slide.Eff ect Effect} Specifies the transition effect to use when displaying the next slide in a slide show; no equivalent command
{Slide.Goto SlideName} Takes the active slide show directly to the slide SlideName; no equivalent command
{Slide.Next} Advances the active slide show to the next slide; no equivalent command
{Slide.Previous} Returns the active slide show to the previous slide; no equivalent command
{Slide.Run SlideShowName} Tools Slide Show Play
{Slide.Speed 0-15} Specifies the transition speed to use when displaying the next slide in a slide show; no equivalent command
{Slide.Time Time} Specifies the time in seconds to display the next slide in a slide show; no equivalent command
Description
{Slide.Option} lets you build, edit, and present graphic slide show sequences. Effect, Speed, and Time are the same options offered in the Slide Effect property in the Light Table window. {Slide.Effect}, {Slide.Speed}, {Slide.Time}, {Slide.Goto}, {Slide.Next}, and {Slide.Previous} can be in the spreadsheet macro which started the slide show, in a spreadsheet macro run from a chart button, or attached directly to a QuickButton or custom dialog box button.
Related topics
{SlideShowExpert}
Description
{SlideShowExpert} is the command equivalent for Tools Slide Show New. The macro has no arguments. {SlideShowExpert} displays the first Slide Show Expert dialog box.
Related topics
{SolveFor.Option}
Command equivalent Equivalent to Tools Numeric Tools Solve For...
{SolveFor.Accuracy Value} ... Accuracy
{SolveFor.Variable_Cell Cell} ... Variable Cell
{SolveFor.Formula_Cell Cell} ... Formula Cell
{SolveFor.Go} ... OK
{SolveFor.Max_Iters Value} ... Max Iterations
{SolveFor.Reset} Clears all Solve For settings; no equivalent menu item
{SolveFor.Target_Value Value} ... Target Value
Description
{SolveFor.Option} is the command equivalent for Tools Numeric Tools Solve For. It solves goal-seeking problems with one variable.
{SolveFor.Formula_Cell} indicates the location of the formula to evaluate. {SolveFor.Target_Value} is the goal to reach, either a number or a cell containing a number. {SolveFor.Variable_Cell} indicates the formula variable (a referenced cell) that can change to reach the target value.
{SolveFor.Max_Iters} and {SolveFor.Accuracy} control how many calculation passes to make and how closely the solution must match the target value. Use {SolveFor.Go} after the other commands. {SolveFor.Reset} clears previous settings.
You can use {SolveFor?} or {SolveFor!} to display the Solve For dialog box. {SolveFor?} lets the user manipulate the dialog box, whereas {SolveFor!} relies on the macro to manipulate it.
Related topics
{Sort.Option}
Command equivalent Equivalent to Tools Sort...
{Sort.BlankCellsFirst 0|1} Determines whether to filter blank cells to the top or not during a sort. Equivalent to Tools Sort Options Sort blank cells first.
Determines whether to sort Labels or Numbers first. Equivalent to Tools Sort Options Sort Numbers Last.
{Sort.Go} ... OK
{Sort.Heading 0|1} Determines whether the first row (or column, depending on sorting based on rows or columns) is used as column headings, or is part of the sort block. Equivalent to Tools Sort Selection contains a heading.
{Sort.Key_1-5 Block} ... Column 1st - 5th
{Sort.Labels "Character Code"|"Dictionary"} ... Labels. Specifies whether text sorts in Dictionary order (ordinary alphabetizing rules) or Character Code order (according to character number--for example, uppercase letters before lowercase). Not recordable. Retained for use with previous Quattro Pro version macros.
{Sort.PreviousSorts N} Stores up to the last five sorts performed in current file. Equivalent to Tools Sort Previous Sorts.
{Sort.Reset} ... Reset
{Sort.Type "Left to Right" | "Top to Bottom" Determines to sort row-wise or column-wise. Equivalent to Tools Sort Options Sort.
Description
{Sort.Option} is equivalent to Tools Sort, which sorts the entries in cells. To perform the sort, use {Sort.Go} after the other sort command equivalents.
You can use {Sort?} or {Sort!} to display the Data Sort dialog box. {Sort?} lets the user manipulate the dialog box, whereas {Sort!} relies on the macro to manipulate it.
{Sort.Reset} allows Corel Quattro Pro to automatically determine the sort block, the first sort key, and whether or not there is a heading row, based on the block surrounding the selected cell, or the selected range.
Example
The following macro sorts the cells A3..C40 using two sort keys (columns A and C). The sort is in ascending order, and values in a column are placed in a group before labels in the column. The labels are sorted in dictionary order.
{Sort.Reset}
{Sort.Block "A:A3..C40"}
{Sort.Type Top to bottom}
{Sort.Heading 0}
{Sort.Key_1 a25}
{Sort.Key_2 c23}
{Sort.Order_1 Ascending}
{Sort.Order_2 Ascending}
{Sort.BlankCellsFirst No}
{Sort.Data Numbers First}
{Sort.PreviousSorts -1}
{Sort.Labels Dictionary}
{Sort.Go}
Related topics
{SPEEDFILL}
Description
{SPEEDFILL} is equivalent to the QuickFill button on the Toolbar. It fills the selected cells with sequential data, based on entries in the upper-left portion of the cells.
To create or modify a series used with QuickFill, use {SeriesManager.Option}.
{SpeedFormat} applies the format FmtName to the selected cells; it is equivalent to Format SpeedFormat or clicking the SpeedFormat button on the Toolbar. The arguments NumFmt? through SubTotals? each specify a part of the format to apply; use 1 to apply the part or 0 to omit the part.
You can use {SpeedFormat?} or {SpeedFormat!} to display the SpeedFormat dialog box. {SpeedFormat?} lets the user manipulate the dialog box, whereas {SpeedFormat!} relies on the macro to manipulate it.
To add or remove formats, use {SpeedFormat.Option}.
Parameters
Parameter Description
FmtName name of the format to apply
NumFmt? to apply the numeric format; 0 otherwise
Font? 1 to apply the font; 0 otherwise
Shading? 1 to apply the shading; 0 otherwise
TextColor? 1 to apply the text color; 0 otherwise
Align? 1 to apply the alignment; 0 otherwise
LineDraw? 1 to apply the line drawing; 0 otherwise
AutoWidth? 1 to automatically size the columns; 0 otherwise
ColHead 1 to apply the column heading format; 0 otherwise
ColTotal? 1 to apply the column total format; 0 otherwise
RowHead? 1 to apply the row heading format; 0 otherwise
RowTotal? 1 to apply the row total format; 0 otherwise
SubTotals? 1 to apply the subtotal format; 0 otherwise
Related topics
{SpeedFormat.Option}
Command Equivalent Equivalent to Format SpeedFormat...
{SpeedFormat.Add Name, ExampleBlock} ... Add
{SpeedFormat.Remove Name} ... Delete
Description
{SpeedFormat.Option} adds formats to the SpeedFormat dialog box, or removes them. {SPEEDFORMAT.Add} lets you specify a name for the new format and the example cells that define the format. {SpeedFormat.Remove} deletes a specified format.
Example
The following macro adds a format named "Strauss" to the SpeedFormat dialog box. The format is based on the example cells A:C10..H25.
{SpeedFormat.Add "Strauss",A:C10..H25}
Related topics
{SPEEDSUM}
Syntax
{SPEEDSUM Block}
Description
{SPEEDSUM} is equivalent to selecting cells and choosing the QuickSum button from the Toolbar. Block includes rows and/or columns to sum, plus adjacent empty cells to hold the results; the default Block is the current selection.
Parameters
Parameter Description
Block coordinates of the cells to sum, including blank cells for results
Related topics
{STEP}
Description
{STEP} is equivalent to the Debug key, Shift+F2.
Related topics
{STEPOFF}
Description
{STEPOFF} exits Debug mode, which runs the macro in slow-motion for debugging. The macro then runs at normal speed.
See {STEPON} for more information.
Related topics
{STEPON}
Description
{STEPON} activates Debug mode, which runs macros one step at a time for debugging. When Corel Quattro Pro encounters a {STEPON} command, it pauses and waits for the user to press any key or click the mouse before it runs the next macro command and pauses again. Debug mode continues until {STEPOFF} is encountered or the macro ends.
{STEPON} is like using the Debug key (Shift+F2) to enter Debug mode, but you can embed it within a macro. The Debug key must be used before a macro begins executing.
Example
This example uses {STEPON} and {STEPOFF} to debug the last routine of a macro. Notice that the empty pairs of braces, placed at the beginning and end of the routine, make it easy to add {STEPON} and {STEPOFF} commands when there is a problem, because you can delete them when you want to debug, and insert them when you do not.
_clean_up {; Save notebook to disk and say goodbye}
{ }{STEPON}
{FileSave}
{BRANCH _quit_msg}
_quit_msg { }{STEPOFF}
{QUIT}
Related topics
{Subroutine}
Syntax
{Subroutine <ArgumentList>}
Description
{Subroutine} calls the subroutine of the specified name, passing along any arguments given in ArgumentList. (Those arguments are then defined within the subroutine using the {DEFINE} command.)
Any macro can be a subroutine. The macro commands in the subroutine run until {RETURN}, a blank cell, or a value is encountered. Then Corel Quattro Pro returns control to the calling routine, continuing execution with the macro command in the next cell. If the subroutine ends with {QUIT}, both the subroutine and the calling macro(s) end.
Example
The following example invokes a subroutine that forces the user to verify printing twice before it begins.
_print {GETLABEL "Do you want to print this (Y/N)?",ans_cell}
{IF @UPPER(ans_cell)="Y"}{_chk_twice}
{HOME}
_chk_twice {; Double-check the print request}
{GETLABEL "Are you certain (Y/N)?",ans_cell}
{IF @UPPER(ans_cell)="N"} {RETURN}
{GETLABEL "Ready to print now (Y/N)?",ans_cell}
{IF @UPPER(ans_cell)="Y"}{Print.DoPrint}
{RETURN}
ans_cell Y
Parameters
Parameter Description
Subroutine name of the subroutine being called (which can be a cell name or a cell address)
ArgumentList list of one or more arguments to be passed to the specified subroutine (optional)
Related topics
{TAB}
Syntax
{TAB <Number>}
Description
{TAB}, like {BIGRIGHT}, is equivalent to the Tab key, which moves one cell to the right.
When the Compatible Keys option of Tools Settings General is checked, {TAB} selects the leftmost cell of the screen that is to the right of the current one.
The optional argument Number specifies how many times to repeat the operation; for example, {TAB 2} is equivalent to pressing Tab twice.
Parameters
Parameter Description
Number any positive integer or the address of a cell containing a positive integer (optional)
Related topics
{TabControl.Option}
Command Equivalent Equivalent to Properties Page List...
{TabControl.SelectPage TabControlName, TabButtonName} Select a named sheet
Description
{TabControl.Option} is equivalent to Properties Page List, which lets you add, remove, and rearrange tabs in the current tab control.
{TABLE}
Description
{TABLE} is equivalent to the Table key, F8, which repeats the last Tools Numeric Tools What-If operation.
Related topics
{TableLink.Option}
Command equivalent Equivalent to Insert External Data Table Link...
{TableLink.Block Block} ... Cells
{TableLink.Name TableName} ... Table
{TableLink.Go} ... OK
Description
{TableLink.Option} is the command equivalent Insert External Data Table Link. It establishes a link to an external database table and displays the table in a Corel Quattro Pro notebook.
You can use {TableLink?} or {TableLink!} to display the Table Link dialog box. {TableLink?} lets the user manipulate the dialog box, whereas {TableLink!} relies on the macro to manipulate it.
Related topics
{TableQuery.Option}
Command equivalent Equivalent to Insert External Data Table Query...
{TableQuery.Destination Block} ... Destination
{TableQuery.FileQuery Yes|No} ... Query in File
{TableQuery.Go} ... OK
{TableQuery.QueryBlock Block} ... QBE Selection
{TableQuery.QueryFile Filename} ... QBE File
Description
{TableQuery.Option} is equivalent to Insert External Data Table Query, which lets you search external databases for records. The query is not performed until {TableQuery.Go} is used.
You can use {TableQuery?} or {TableQuery!} to display the Table Query dialog box. {TableQuery?} lets the user manipulate the dialog box, whereas {TableQuery!} relies on the macro to manipulate it.
Example
The following macro searches the external table TASKLIST.DB using the query file TASKLIST.QBE. The results of the search are stored in A:A2.
{TableQuery.FileQuery Yes}
{TableQuery.QueryFile TASKLIST.QBE}
{TableQuery.Destination A:A2}
{TableQuery.Go}
The next macro searches the same database, but uses the query defined in the named cell task_query.
{TableQuery.FileQuery No}
{TableQuery.QueryBlock task_query}
{TableQuery.Destination A:A2}
{TableQuery.Go}
Related topics
{TableView}
Description
{TableView} is equivalent to Insert External Data Database Desktop, which launches the Database Desktop.
Related topics
{TemplateTB.Option}
Command Equivalent Description
{TemplateTB.Add Name, Path} Adds a new Template Toolbar
{TemplateTB.Show Name} Shows a Template Toolbar
{TemplateTB.Hide Name} Hides a Template Toolbar
{TemplateTB.Remove Name} Removes a Template Toolbar
{TemplateTB.Reset Name} Resets a Template Toolbar to its default setup
{TemplateTB.Docking_Position Name, Top | Left | Right | Bottom | Floating} Sets the docking position of a Template Toolbar
{TemplateTB.Rename Name, NewName} Renames a Template Toolbar
{TemplateTB.Context Name, Desktop (Yes | No), Notebook (Yes | No), Chart (Yes | No), Dialog (Yes | No), Objects Page (Yes | No), Slide Show (Yes | No)} Sets the contexts in Corel Quattro Pro in which a Template Toolbar appears
Description
{TemplateTB.Option} is similar to {Toolbar.Option} except that it controls the Template Toolbar.
{TERMINATE}
Syntax
{TERMINATE DDEChannel}
Description
{TERMINATE} closes down a DDE conversation opened with {INITIATE}.
For an example using {TERMINATE}, see {EXECUTE}.
Parameters
Parameter Description
DDEChannel channel number of the DDE conversation to terminate
{Toolbar.Docking_Position Name, Top | Left | Right | Bottom | Floating, Order} Options Docking Position
{Toolbar.Hide Name} Hide
{Toolbar.Remove Name} Remove
{Toolbar.Rename Name, NewName} Options Name
{Toolbar.Reset Name} Reset
{Toolbar.Show Name} Show
Description
{Toolbar.Option} is the command equivalent for View Toolbars.
{Toolbar.Docking_Position Order} is a numeric number used to position the selected toolbar in relation to other visible toolbars at the specified docking position:
-1 displays the specified toolbar at the end of toolbars at the specified docking position
0 displays the specified toolbar at the beginning of toolbars at the specified docking position
1 displays the specified toolbar 1 position in from the beginning of toolbars at the specified docking position
n displays the specified toolbar n positions in from the beginning of toolbars at the specified docking position.
To record such macros as adding, positioning, and removing toolbars, right-click anywhere on a visible toolbar while recording a macro.
{TTESTM} performs a Student's t-Test using two indepependent (rather than paired) samples with equal variances. {TTESTM} is equivalent to the t-Test analysis tool.
Parameters
Parameter Description
InBlock1 one or more numeric cell values representing the first input cells
InBlock2 one or more numeric cell values representing the second input cells
OutBlock upper left cell of the output cells
Labels 1 if labels are located in the first column or row of the input cells; 0 if the input cells do not contain labels; the default is 0
Alpha significance level of the test; the default is 0.05
Difference value indicating the hypothetical difference in the means between InBlock1 and InBlock2; the default is 0
Related topics
{UNDO}
Description
{UNDO} "takes back" the last command given and restores the previous state for most commands.
Related topics
{UngroupObjects}
Description
{UngroupObjects} is the command equivalent for Format Ungroup. It separates the selected group of chart annotation objects so each can be moved or modified without affecting the others.
Related topics
{UP} and {U}
Syntax
{UP <Number>} or {U <Number>}
Description
{UP} and {U} are equivalent to the Up Arrow key. The optional argument Number moves the selector up the corresponding number of rows. You can use cell references or cell names as arguments.
Example
{UP}{UP}{UP} moves the selector up three rows.
{UP 4} moves the selector up four rows.
{UP C13} moves the selector up the number of rows specified in cell C13.
{UP temp} moves the selector up the number of rows specified in the first cell of the selection named temp.
Parameters
Parameter Description
Number any positive integer (optional)
Related topics
{VLINE}
Syntax
{VLINE Distance}
Description
{VLINE} scrolls the active notebook vertically by Distance rows. If the number is positive, it scrolls down; if negative, it scrolls up. {VLINE} does not move the selector; only the view of the notebook is altered. Use {DOWN} or {UP} to move the selector vertically.
Example
{VLINE 11} scrolls the display 11 rows down.
{VLINE -4} scrolls the display 4 columns up.
Parameters
Parameter Description
Distance number of rows to scroll the active notebook vertically
Related topics
{VPAGE}
Syntax
{VPAGE Distance}
Description
{VPAGE} scrolls the active notebook vertically by Distance screens. If the number is positive, it scrolls down; if negative, it scrolls up. {VPAGE} does not move the selector; only the view of the notebook is altered. Use the commands {PGDN} or {PGUP} to move the selector vertically.
Parameters
Parameter Description
Distance number of screens to scroll the active notebook vertically
Related topics
{WAIT}
Syntax
{WAIT DateTimeNumber}
Description
{WAIT} pauses macro execution until the time corresponding to DateTimeNumber arrives. DateTimeNumber is a standard date/time serial number (both date and time portions must be included). If the current date is already later than the date specified in DateTimeNumber, macro execution continues immediately.
While execution is suspended, the macro is inactive, a WAIT indicator displays on the status line, and normal notebook operation can be restored only by pressing Ctrl+Break.
Example
The following macro beeps, displays a "Go home" message, and suspends all execution until 8:00 a.m. the next day:
{BEEP 3}
{PUTCELL "Time to go home!"}
{DOWN}
{WAIT @TODAY+1+@TIMEVALUE("8:00 AM")}
This macro waits for one day:
{WAIT @NOW+1}
This macro uses {WAIT} to alert the user by sounding five short beeps, spaced two seconds apart:
\H {FOR counter,1,5,1,_loop_here}
_loop_here {BEEP 3}
{WAIT @NOW+@TIME(0,0,2)}
counter 6
Parameters
Parameter Description
DateTimeNumber the date and time at which macro execution can resume
Related topics
{WaitCursorOn} and {WaitCursorOff}
{WaitCursorOn} and {WaitCursorOff} turn on or off the default Windows "busy" cursor.
{WhatIf.Option}
Command equivalent Equivalent to Tools Numeric Tools What-If...
{WhatIf.One_Way} ... One Free Variable, ... Generate
{WhatIf.Reset} ... Reset
{WhatIf.Two_Way} ... Two Free Variables, ... Generate
Description
{WhatIf.Option} is the command equivalent for Tools Numeric Tools What-If. It builds one- or two-variable "what-if" tables that display a range of results for different conditions.
If you are creating a one-variable table, use these command equivalents: {WhatIf.Input_Cell_1}, {WhatIf.Block}, {WhatIf.One_Way}. For two-variable tables, use {WhatIf.Input_Cell_2} after indicating the first input cell; use {WhatIf.Two_Way} instead of {WhatIf.One_Way}.
You can use {WhatIf?} or {WhatIf!} to display the What-If dialog box. {WhatIf?} lets the user manipulate the dialog box, whereas {WhatIf!} relies on the macro to manipulate it.
Example
The following macro defines A4..H18 as the "what-if" cells, B1 as Input Cell 1, B2 as Input Cell 2, and builds a two-variable table.
{Whatif.Block A:A4..A:H18}
{Whatif.Input_cell_1 A:B1}
{Whatif.Input_cell_2 A:B2}
{Whatif.Two_Way}
Related topics
{WhatIfExpert}
Description
{WhatIfExpert} is the command equivalent for Tools Numeric Tools What-If. The macro has no arguments. {WhatIfExpert} displays the first What-If Expert dialog box.
Related topics
{WINDOW}
Syntax
{WINDOW<Number>}
Description
{WINDOW} switches to the specified open notebook window (1-9). This command is for compatibility with Corel Quattro Pro for DOS; use {ACTIVATE} to activate windows when developing macros for Corel Quattro Pro for Windows.
The argument Number is optional; {WINDOW} without an argument is equivalent to the Pane key, F6.
Parameters
Parameter Description
Number number of an open notebook window (1-9)
Related topics
{WindowArrIcon}
Description
{WindowArrIcon} is equivalent to Window Arrange Icons, which lines up minimized windows on the Corel Quattro Pro desktop or icons on the Objects sheet.
Related topics
{WindowCascade}
Description
{WindowCascade} is equivalent to Window Cascade, which rearranges all open windows on the Corel Quattro Pro desktop.
Related topics
{WindowClose}
Description
{WindowClose} is equivalent to Close in a Control menu, which closes the active window (if the active window is not saved, a prompt appears to confirm the operation).
Related topics
{WindowHide}
Description
{WindowHide} is equivalent to Window Hide, which conceals the active notebook window.
Related topics
{WindowMaximize}
Description
{WindowMaximize} is equivalent to Maximize in a Control menu, which enlarges the active window so it fills the screen.
Related topics
{WindowMinimize}
Description
{WindowMinimize} is equivalent to Minimize in a Control menu, which shrinks the active window to an icon on the Corel Quattro Pro desktop.
Related topics
{WindowMove}
Syntax
{WindowMove UpperLeftX, UpperLeftY}
Description
{WindowMove} is equivalent to Move in a Control menu, which lets you move the active window. UpperLeftX and UpperLeftY are the new coordinates of the upper-left corner of the window.
Parameters
Parameter Description
UpperLeftX distance between the left side of the Corel Quattro Pro window and the left side of active window, in pixels
UpperLeftY distance between the bottom of the input line and the top of active window, in pixels
Related topics
{WindowNewView}
Description
{WindowNewView} is the command equivalent for Window New View. It displays a duplicate copy of the active notebook in a new window.
Related topics
{WindowNext}
Description
{WindowNext} is equivalent to choosing Next in a Control menu or pressing Ctrl+F6. It makes the next window active.
{WindowPanes} is the command equivalent for View Split Windows. It splits a notebook window into two horizontal or vertical panes; use Clear to restore a single pane.
Width and Height indicate the ratio relationship between the panes.
You can use {WindowPanes?} or {WindowPanes!} to display the Split Window dialog box. {WindowPanes?} lets the user manipulate the dialog box, whereas {WindowPanes!} relies on the macro to manipulate it.
Example
{WindowPanes Vertical,0,2,1} splits the notebook window into two vertical panes, not synchronized. The first pane is twice as wide as the second.
Parameters
Parameter Description
Synch? whether the panes are synchronized: yes (1) or no (0)
Width width of the left pane or height of the upper pane (optional)
Height width of the right pane or height of the lower pane (optional)
Related topics
{WindowQPW.Option}
Command equivalent Equivalent to the Corel Quattro Pro Control menu ...
{WindowQPW.Maximize} ... Maximize
{WindowQPW.Minimize} ... Minimize
{WindowQPW.Restore} ... Restore
Description
{WindowQPW.Option} is the command equivalent for the Maximize, Minimize, and Restore commands on the Corel Quattro Pro Control menu.
¿ {WindowQPW.Maximize} enlarges the Corel Quattro Pro window so it fills the screen.
¿ {WindowQPW.Minimize} shrinks the Corel Quattro Pro window to an icon.
¿ {WindowQPW.Restore} restores the Corel Quattro Pro window to its original size.
Related topics
{WindowRestore}
Description
{WindowRestore} is equivalent to Restore on the Control Menu. It restores minimized windows to their original size.
Related topics
{WindowShow}
Syntax
{WindowShow Name}
Description
{WindowShow} is the command equivalent for Window Show. It shows hidden window Name and makes it active.
You can use {WindowShow?} or {WindowShow!} to display the Show Window dialog box. {WindowShow?} lets the user manipulate the dialog box, whereas {WindowShow!} relies on the macro to manipulate it.
Parameters
Parameter Description
Name name of the hidden window to show
Related topics
{WindowSize}
Syntax
{WindowSize X,Y}
Description
{WindowSize} is equivalent to Size in the Control menu. It sizes the active window to the specified width and height.
Parameters
Parameter Description
X new window width, in pixels
Y new window height, in pixels
Related topics
{WINDOWSOFF}
Description
{WINDOWSOFF} disables normal screen updating during macro execution when Corel Quattro Pro's Macro Suppress-Redraw property is set to None. It can significantly speed up execution for most macros because it saves Corel Quattro Pro the time normally needed to redraw the screen each time a cell changes. Corel Quattro Pro cancels it once the macro stops executing, so the user is not "locked out" of the screen. To cancel its effect within the same macro, use {WINDOWSON}.
Use {WINDOWSOFF} with {PANELOFF} to completely disable normal screen updating.
After a {WINDOWSOFF} command, avoid letting users point to cells in response to an Edit command. The selector may be in a different cell than the "frozen" display indicates. If users must point to cells, precede it with a {WINDOWSON} command.
Example
The following macro uses {WINDOWSOFF} and {WINDOWSON} to turn off screen updating while Corel Quattro Pro sorts a list of vendors with the cell name vendor_name, thereby speeding up the sort operation.
sort_blk vendor_name
key_nm vendor_name
\W {QGOTO}sort_message~
{WINDOWSOFF}
{_sort vendor_name}
{WINDOWSON}
_sort {DEFINE sort_blk}
{Sort.Block @@(sort_blk)}
{BlockCopy sort_blk,key_nm}
{Sort.Key_1 @@(key_nm)}
{Sort.Order_1 "Ascending"}
{Sort.Go}
sort_message SORT IS IN PROGRESS
vendor_name General Cement Co.
Alveoli Mfg., Inc.
Sandab Development
Consolidated Dust
Related topics
{WINDOWSON}
Description
{WINDOWSON} reenables normal screen updating during macro execution, canceling the effects of a previous {WINDOWSOFF}. However, the screen will not be updated until {CALC} is encountered or the macro ends. If {WINDOWSON} is called when screen updating is already in effect, the command is ignored.
See {WINDOWSOFF}for an example using {WINDOWSON}.
Related topics
{WindowTile}
Description
{WindowTile} is the command equivalent for Window Tile. It displays all open windows without overlapping them.
Related topics
{WindowTile.TileTopToBottom}
Description
Tiles multiple files horizontally. Equivalent to Window Tile Top To Bottom.
{WindowTitles}
Syntax
{WindowTitles Horizontal | Vertical | Both | Clear}
Description
{WindowTitles Horizontal|Vertical|Both|Clear} is the command equivalent for View Locked Titles. It locks specific rows and/or columns of a spreadsheet sheet onscreen as titles. When you scroll, the titles remain fixed onscreen while the rows below (or columns to the right) scroll as usual. "Horizontal" locks rows above the active cell, "Vertical" locks columns to the left of the active cell, and "Both" locks both rows and columns. Use "Clear" to unlock the titles.
You can use {WindowTitles?} or {WindowTitles!} to display the Locked Titles dialog box. {WindowTitles?} lets the user manipulate the dialog box, whereas {WindowTitles!} relies on the macro to manipulate it.
You can use {WindowTitles.Title} with @COMMAND, @PROPERTY, and @CURVALUE.
Example
Use @COMMAND{"WindowTitles.Title"} to determine whether locked titles are in use and display their type (Horizontal, Vertical, Both, or Clear). You can also use this command in macros to check for locked titles.
Command equivalent Equivalent to File Workspace...
{Workspace.Restore Filename} ... Restore
{Workspace.Save Filename} ... Save
Description
{Workspace.Save} saves all open notebooks as a group with the specified Filename (Corel Quattro Pro's default file extension for workspaces is .WBS). {Workspace.Restore} opens the specified file.
Related topics
{WRITE}
Syntax
{WRITE String<,String2,String3,...>}
Description
{WRITE} copies String to a file opened with the {OPEN} command, starting at the location of the file pointer. The file pointer is advanced to the position following the last character written, and the file's size increases if necessary. See {GETPOS} for a discussion of the file pointer.
{WRITE} does not place the carriage return and linefeed characters at the ends of lines. To include these characters, use {WRITELN}.
String can be a quoted string or text formula. If using more than one String, separate them with commas. For example, to write the label Dear Ms. followed by the contents of B6 into the file, use the following:
{WRITE "Dear Ms. ",+B6}
You can use an unlimited number of String arguments with {WRITE}.
If no file is open, or if there is insufficient room on the disk to increase the file's size, {WRITE} fails. Macro execution then continues with the first command after {WRITE} (in the same cell). If {WRITE} is successful, the rest of that cell's commands are ignored, and execution continues on the next row below.
If you try to reference a cell that does not contain a label, an error message displays.
Tips
¿ After you finish accessing a file with {WRITE}, it must be closed with {CLOSE}. Otherwise, the file could become corrupted if the computer is turned off or otherwise interrupted.
Example
The following example creates a text file with fixed-length fields that will serve as a phone list database. After the macro runs, the file will look like this:
Golden, David 415-555-7774;Hack, Edmund 201-555-3511;Hall, Sue Ann 617-555-5678
See the description of {READ} to see how to read a file like this.
\K {OPEN "A:PHONEDIR.PRN",W}
{WRITE "Golden, David "}
{WRITE "415-555-7774;"}
{WRITE "Hack, Edmund "}
{WRITE "201-555-3511;"}
{WRITE "Hall, Sue Ann "}
{WRITE "617-555-5678"}
{CLOSE}
Parameters
Parameter Description
String string of characters to be written into the open file
Related topics
{WRITELN}
Syntax
{WRITELN String<,String2,String3,...>}
Description
{WRITELN} copies String(s) to a file opened with {OPEN}, starting at the location of the file pointer, and ends the string(s) with the carriage-return and linefeed characters. The file pointer advances to the position following the last character written, and the file's size increases if necessary. (See {GETPOS} for a discussion of the file pointer.)
To enter a blank line in the file, use {WRITELN ""}. To enter characters without carriage-return/linefeed characters, use {WRITE}.
String can be a quoted string or a text formula. If using more than one String, separate them with commas. For example, to write the label Dear Ms. followed by the contents of B6 into the file you would use
{WRITELN "Dear Ms. ",+B6}
A carriage return and linefeed character are placed at the end of all strings combined, not after each. You can use an unlimited number of String arguments with {WRITELN}.
If no file is open, or if there is insufficient room on the disk to increase file's size, {WRITELN} fails. Macro execution then continues with the first command after {WRITELN} in the same cell. If {WRITELN} succeeds, the rest of that cell's commands are ignored, and execution continues on the next row below.
Tips
¿ After you finish accessing a file with {WRITELN}, you must close the file with {CLOSE}. Otherwise, the file could become corrupted if the computer is turned off or otherwise interrupted.
Example
The following example shows how {WRITELN} is used to write a line of text to the file TEST.TXT. This line is terminated by the CR (carriage-return) and LF (linefeed) characters.
\Z {OPEN "A:TEST.TXT",W}
{WRITELN "This is a short line."}
{CLOSE}
Parameters
Parameter Description
String string of characters to be written into the open file as a single line
Related topics
{ZOOM}
Description
{ZOOM} maximizes and restores the active window.
This command is for compatibility with Corel Quattro Pro for DOS; use {WindowMaximize} and {WindowRestore} when developing macros for Corel Quattro Pro for Windows.
To change the zoom factor for a notebook or sheet, use {Notebook.Zoom_Factor} or {Page.Zoom_Factor}, respectively.