{SAMPLE} returns a periodic or random sample from values in InBlock. {SAMPLE} is equivalent to the Sampling analysis tool.
Parameters
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
{SaveHtml! }
Syntax
{SaveHtml!}
Description
Lets you open and view the Publish to Internet dialog box.
Example
SaveHtml!
{SaveHtml.BackgroundColor}
Syntax
{SaveHtml.BackgroundColor BkColor}
PerfectScript Syntax
SaveHtml_BackgroundColor (BkColor?: String)
Description
Lets you specify the default color of the background.
Example
SaveHtml.BackgroundColor Black
SaveHtml.BackgroundColor "#ff00ff"
Parameter
BkColor The name of the default background color
Note
SaveHtml.BackgroundColor will be effective only when the SaveHtml.UseBrowserColor command is called with 0
{SaveHtml.FileOptions}
Syntax
{SaveHtml.FileOptions FileData}
PerfectScript Syntax
SaveHtml_FileOptions (FileData?: String)
Description
Lets you specify the initial .HTML file name and the default extension to be used. FileData consists of two variables delimited by a semicolon.
Example
SaveHtml.FileOptions "Index.HTM; HTM"
Parameters
FileData [semicolon delimited] Initial name
The initial .HTML file name
Extension
The default extension of .HTML files
{SaveHtml.GraphicType}
Syntax
{SaveHtml.GraphicType Value}
PerfectScript Syntax
SaveHtml_GraphicType (Value?: Numeric)
Description
Lets you specify the file format to use for graphic images.
Example
SaveHtml.GraphicType 1
Result: Use the .JPG file format.
Parameter
Value 0 The .GIF file format
1 The .JPG file format
2 The .PNG file format
{SaveHtml.Header}
Syntax
{SaveHtml.Header Header}
PerfectScript Syntax
SaveHtml_Header (Header?: String)
Description
Lets you specify the text for the header section of the .HTML document.
Example
SaveHtml.Header "Header text of this file"
Parameter
Header The text
{SaveHtml.HeaderDescription}
Syntax
{SaveHtml.HeaderDescription HdrDesc}
PerfectScript Syntax
SaveHtml_HeaderDescription (HdrDesc?: String)
Description
Lets you specify the header description.
Example
SaveHtml.HeaderDescription "Header description for this file"
Parameter
HdrDesc The header description
{SaveHtml.Layout}
Syntax
{SaveHtml.Layout Value}
PerfectScript Syntax
SaveHtml_Layout (Value?: Numeric)
Description
Lets you specify the layout to be used.
Example
SaveHtml.Layout 2
Parameter
Value 0 Single page
1 Frame enhanced pages
2 Multiple pages
{SaveHtml.LineBeforeFooter}
Syntax
{SaveHtml.LineBeforeFooter Enable}
PerfectScript Syntax
SaveHtml_LineBeforeFooter (Enable?: Boolean)
Description
Lets you specify whether or not to insert a line before the footer.
Example
SaveHtml.LineBeforeFooter 1
Parameter
Enable 0 No footer line
1 Footer line
{SaveHtml.LineBeforeHeader}
Syntax
{SaveHtml.LineBeforeHeader Enable}
PerfectScript Syntax
SaveHtml_LineBeforeHeader (Enable?: Boolean)
Description
Lets you specify whether or not to insert a line before the header.
Example
SaveHtml.LineBeforeHeader 0
Parameter
Enable 0 No header line
1 Header line
{SaveHtml.LinkColor}
Syntax
{SaveHtml.LinkColor LinkColor}
PerfectScript Syntax
SaveHtml_LinkColor (LinkColor?: String)
Description
Lets you specify the default color of the links
Example
SaveHtml.LinkColor Black
SaveHtml.LinkColor "#ff00ff"
Parameter
LinkColor The name of the default link color
Note
SaveHtml.LinkColor will be effective only when the SaveHtml.UseBrowserColor command is called with 0
{SaveHtml.OutputFile}
Syntax
{SaveHtml.OutputFile Filename}
PerfectScript Syntax
SaveHtml_OutputFile (Filename?: String)
Description
The name of the .HTML file into which the data is to be published.
Example
SaveHtml.OutputFile "C:\Shared\New.HTM"
Parameter
Filename The name of the .HTML file
{SaveHtml.OutputType}
Syntax
{SaveHtml.OutputType Value}
PerfectScript Syntax
SaveHtml_OutputType (Value?: Numeric)
Description
Lets you specify the type of the output file.
Example
SaveHtml.OutputType 1
Parameter
Value 0 Output as .HTML
1 Output as .XML
2 Insert into an existing .HTML file
{SaveHtml.SaveHtml}
Syntax
{SaveHtml.SaveHtml}
PerfectScript Syntax
SaveHtml_SaveHtml
Description
Saves the data from the specified range into a .HTML file. Takes default values if no values have been specified.
{SaveHtml.Source}
Syntax
{SaveHtml.Source SourceData}
PerfectScript Syntax
SaveHtml_OutputFile (SourceData?: String)
Description
Lets you specify the name of the .HTML file into which the data is to be published. SourceData consists of two variables delimited by a semicolon.
Example
SaveHtml.Source "Range:A:A11..D11; 0"
Parameters
SourceData [semicolon delimited] Range
The range specified as "Range:" followed by page name, followed by actual range.
Boolean
0 Output as table
1 Output as text
{SaveHtml.TextColor}
Syntax
{SaveHtml.TextColor TextColor}
PerfectScript Syntax
SaveHtml_TextColor (TextColor?: String)
Description
Lets you specify the default color of the text.
Example
SaveHtml.TextColor Black
SaveHtml.TextColor "#ff00ff"
Parameter
TextColor The name of the default text color
Note
SaveHtml.TextColor will be effective only when the SaveHtml.UseBrowserColor command is called with 0
{SaveHtml.Title}
Syntax
{SaveHtml.Title Title}
PerfectScript Syntax
SaveHtml_Title (Title?: String)
Description
Lets you specify the title for the file.
Example
SaveHtml.Title "Title info of this file"
Parameter
Title The title for the file
{SaveHtml.UseBrowserColor}
Syntax
{SaveHtml.UseBrowserColor Enable}
PerfectScript Syntax
SaveHtml_UseBrowserColor (Enable?: Boolean)
Description
Lets you specify whether browser colors or the colors you specify are to be used.
Example
SaveHtml.UseBrowserColor 0
Parameter
Enable 0 Lets you specify the colors.
1 Use the browser's colors.
{SaveHtml.UserDetails}
Syntax
{SaveHtml.UserDetails UserData}
PerfectScript Syntax
SaveHtml_UserDetails (UserData?: String)
Description
Lets you specify the user details for the .HTML file. UserData consists of three variables delimited by semicolons.
{Scenario} 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 you 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}
Options
{Scenario.AddCells <Block>} Defines the selected cells as change-and-result cells.
{Scenario.Capture ScenarioName} Takes a baseline snapshot of data
{Scenario.CaptureArea Area,Block} Specifies the area where the Scenario Manager tracks data and format changes.
{Scenario.Close} Closes a Scenario Manager session.
{Scenario.DeleteGroup GroupName} Deletes the active group and all scenarios in it.
{Scenario.Find} Automatically locates changed cells after you capture the baseline scenario and make changes.
{Scenario.Highlight Highlight?(0|1), ChangeCellColor(0-15), ResultCellColor(0-15)} Turns on and off coloring of change-and-result cells.
{Scenario.NewGroup GroupName} Creates and names a new Scenario Manager group.
{Scenario.Open} Initializes a Scenario Manager session.
{Scenario.Remove ScenarioName} Deletes the selected scenario.
{Scenario.RemoveCells <Block>} Excludes the selected change-and-result cells from the scenario.
{Scenario.RenameGroup OldGroupName,NewGroupName} Applies another name to the active group.
{Scenario.Report AllGroups(0|1), LeftLabels(0|1), TopLabels(0|1), <Block>} Creates a summary report of the change-and-result cells in each scenario.
{Scenario.Show ScenarioName} Lists scenarios you have captured in the active group of scenarios
{Scenario.Update_On_Block Update?(0|1)} Offers options for using the Scenario Manager to track versions.
{Scenario.UseGroup GroupName} Lists the scenario groups included in the active notebook.
{ScenarioExpert}
Description
{ScenarioExpert} displays the first Scenario Expert dialog box. The macro has no arguments.
{SCROLLOFF} and {SCROLLON}
Description
{SCROLLOFF} and {SCROLLON} are equivalent to Scroll Lock off and Scroll Lock on, respectively.
{Search} 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 you 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}
Options
{Search.Block Block} Specifies the cell or multiple cells to search.
{Search.Case Any|Exact} Considers capitalization during the search.
{Search.Direction Column|Row} Searches down columns first, starting with column 1.
{Search.Find String} Specifies the group of characters to be found in labels, values, and formulas.
{Search.Look_In Condition | Formula | Value} Specifies what is included in the search.
{Search.Match Part|Whole} Forces the search string to match all of a cell entry.
{Search.Next} Begins or resumes a forward search without replacing found entries.
{Search.Previous} Begins or resumes a backward search without replacing found entries.
{Search.Replace} Lets you decide on an individual basis whether to replace each string found.
{Search.ReplaceAll} Replaces all found strings without stopping.
{Search.ReplaceBy String} Specifies the group of characters to substitute for characters found.
{Search.Reset} Clears any entries in the dialog box and reinstates the defaults.
{SelectAll}
Description
{SelectAll} selects every cell in the active sheet.
{SELECTBLOCK}
Syntax
{SELECTBLOCK Block, <ActiveCell>}
PerfectScript Syntax
SelectBlock (Block:String; [ActiveCell:String])
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
Block Coordinates of the cell(s) to select
ActiveCell Address of the cell within the cells to make active
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 active notebook window with the object name Button1.
Parameters
ObjectIDx Name of the notebook object(s) to select
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
ObjectIDx Identification number or name of the object(s) to select
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 you 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.
{GraphEdit Profit99}
{Series.Insert 2,A:G1..G27}
{Series.Go}
Options
{Series.Data_Range SeriesNumber | "XaxisLabelSeries" | "LegendSeries", Block <,CreateIfNotExist? (0|1)>} Specifies the cell coordinates of the chart data, legend, or label. You must place this value within quotations.
{Series.Delete SeriesNumber <,AndAllSeriesFollowing?>} Deletes the selected series.
{Series.Go} Changes the series according to your selections.
{Series.Insert SeriesNumber, Block} Adds a new series after the selected series.
{Series.Label_Range SeriesNumber, Block <,CreateIfNotExist? (0|1)>} Specifies the series used for labels.
{Series.Legend SeriesNumber, LegendText} Specifies the series used for the legend. You must place this value within quotations.
{Series.Reverse_Series 1|0} Plots the last series first, then moves backwards through the series order.
{Series.Swap_Row_Col 1|0} Plots columns as series when Quattro Pro plots series by rows, and plots rows as series when Quattro Pro would plot columns.
{SeriesManager} create a new QuickFill list series. Use {SeriesManager} to create a formula series and a list series.
You can use {SeriesManager?} or {SeriesManager!} to display the Define Fill Series dialog box. {SeriesManager?} lets you 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"}
{SpeedFill}
{SeriesManager.Go "First of Month",Columns, A:A2}
Options
{SeriesManager.Define Name, Formula, FormulaText, SeedText} Lets you define a new series.
{SeriesManager.Define Name, List, Repeating?(0|1), Value1 <,Value2, Value3,...>} Lets you define and name a new series.
{SeriesManager.Go Name, Rows | Columns | Tabs, Block} Quickly fill cells with a sequence of entries.
{SeriesManager.Remove Name} Deletes the selected series.
{SeriesManager.Rename OldName, NewName} Changes the name for the selected series.
{SetCellString}
Syntax
{SetCellString Cell; String}
PerfectScript Syntax
SetCellString (Cell: String; String: String)
Description
Lets you specify the string insert into the cell.
Example
{SetCellString A1; "The string"}
Parameters
Cell The cell into which you want to insert the string
String The string you want to insert into the cell
{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
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)
{SETLCID}
Syntax
{SETLCID <LocalID>}
PerfectScript Syntax
SetLCID ([LocalID:Numeric])
Description
{SETLCID} sets the locale ID to the default locale ID or to one specified by LocalID. The local 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.
Parameters
LocalID The value of the local ID
{SETMENUBAR}
Syntax
{SETMENUBAR <SystemDefinition>}
PerfectScript Syntax
SetMenuBar ([SystemDefinition:String])
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 Quattro Pro menu system.
Example
{SETMENUBAR "A3..C324"} makes the system defined in A3..C324 the active menu system.
Parameters
SystemDefinition Cells containing a menu system definition
{SETOBJECTPROPERTY} can change the property settings of many 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 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:
Value New property setting (or another instance of Object.Property to copy the new setting from)
{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
FilePosition the number of bytes into a file to set the file pointer to
{SETPROPERTY}
Syntax
{SETPROPERTY Property,Value}
PerfectScript Syntax
SetProperty (Property:String; Value:String)
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 (_).
Example
{SETPROPERTY "Text_Color", "3"}
Result: Sets the selected cells' Text Color property to the fourth color on the notebook palette (the first color is 0).
Parameters
Property String representing the property to change
Value String representing the setting to apply to the property
{SHIFT}
Syntax
Shift()
Description
This is equivalent to using the shift key.
{ShowErrorMessage}
Syntax
{ShowErrorMessage}
PerfectScript Syntax
ShowErrorMessage ()
Description
Reinstates the ability for Quattro Pro to show an error message, if one is warranted.
{Slide}
Syntax
{Slide.Option}
PerfectScript Syntax
Slide_Effect (Effect:String)
Slide_Goto (SlideName:String)
Slide_Next ()
Slide_Previous ()
Slide_Run (SlideShowName:String)
Slide_Speed (Speed:Numeric)
Slide_Time (Time:Numeric)
Description
{Slide} lets you build, edit, and present graphics 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.
Options
{Slide.Eff ect Effect} Specifies the transition effect to use when displaying the next slide in a slide show.
{Slide.Goto SlideName} Takes the active slide show directly to the slide SlideName.
{Slide.Next} Advances the active slide show to the next slide.
{Slide.Previous} Returns the active slide show to the previous slide.
{Slide.Run SlideShowName} Plays the slide show.
{Slide.Speed 0-15} Specifies the transition speed to use when displaying the next slide in a slide show.
{Slide.Time Time} Specifies the time in seconds to display the next slide in a slide show.
{SlideShowExpert}
Description
{SlideShowExpert} displays the first Slide Show Expert dialog box. The macro has no arguments.
{SolveFor}
Syntax
{SolveFor.Option}
PerfectScript Syntax
SolveFor_Accuracy (Value:Numeric)
SolveFor_Formula_Cell (Cell:String)
SolveFor_Go ()
SolveFor_Max_Iters (Iters:Numeric)
SolveFor_Reset ()
SolveFor_Target_Value (Value:Numeric)
SolveFor_Variable_Cell (Cell:String)
Description
{SolveFor} 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 you manipulate the dialog box, whereas {SolveFor!} relies on the macro to manipulate it.
Options
{SolveFor.Accuracy Value} Specifies how close Solve For must get to the Target Value.
{SolveFor.Variable_Cell Cell} Indicates which cell Quattro Pro can change to solve for a desired value.
{SolveFor.Formula_Cell Cell} Specifies the cell containing the formula you want to solve.
{SolveFor.Go} Solves for the Target Value.
{SolveFor.Max_Iters Value} Determines how many passes Solve For makes to solve the formula.
{SolveFor.Reset} Clears all Solve For settings.
{SolveFor.Target_Value Value} Specifies the result you want from the Formula Cell.
{Sort} 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 you manipulate the dialog box, whereas {Sort!} relies on the macro to manipulate it.
{Sort.Reset} allows Quattro Pro to automatically determine the sort block, the first sort key, and whether 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}
Options
{Sort.BlankCellsFirst 0|1} Determines whether to filter blank cells to the top during a sort.
{Sort.Block Block} Specifies cells to be sorted, including row labels but excluding column headings.
{Sort.Data "Labels First"|"Numbers First"} Determines whether to sort Labels or Numbers first.
{Sort.Go} Performs the sort you specified.
{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.
{Sort.Key_1-5 Block} Specifies up to 5 sort keys, in the order they are to be sorted.
{Sort.Labels "Character Code"|"Dictionary"} Specifies whether text sorts in Dictionary order (ordinary alphabetizing rules) or Character Code order (according to character number-for example, uppercase letters before lowercase). Retained for use with previous Quattro Pro version macros.
{Sort.Order_1-5 Ascending|Descending} Specifies ascending or descending sort order
{Sort.PreviousSorts N} Stores up to the last five sorts performed in current file.
{Sort.Reset} Clears all entries and restores defaults.
{Sort.Type "Left to Right" | "Top to Bottom" Determines to sort by rows or columns.
{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. 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 you manipulate the dialog box, whereas {SpeedFormat!} relies on the macro to manipulate it.
To add or remove formats, use {SpeedFormat.Option}.
Parameters
FmtName Name of the format to apply
NumFmt? 1 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
{SpeedFormat} 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}
Options
{SpeedFormat.Add Name, ExampleBlock} Creates a new custom format.
{SpeedFormat.Remove Name} Deletes the active SpeedFormat.
{SPEEDSUM}
Syntax
{SPEEDSUM Block}
PerfectScript Syntax
SpeedSum ([Block:String])
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
Block Coordinates of the cells to sum, including blank cells for results
{STEP}
Description
{STEP} is equivalent to the Debug key, Shift+F2.
{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.
Note
This command is obsolete
{STEPON}
Description
{STEPON} activates Debug mode, which runs macros one step at a time for debugging. When Quattro Pro encounters a {STEPON} command, it pauses and waits for you 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}
Note
This command is obsolete
{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 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 you 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
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)
{SuppressErrorValue}
Syntax
{SuppressErrorValue}
PerfectScript Syntax
SuppressErrorValue ()
Description
Suppresses the ability for Quattro Pro to return a specific error value, if one is warranted.