Workbook Script Tool Arguments

The following properties are available for Workbook Script Tool Arguments objects, grouped by the categories shown in the Toolbars Designer.

Misc

Property Type Default Description

ButtonValuePropertyValue

string

When the tool is a button tool, the ButtonValuePropertyValue is an optional setting that indicates the value to be assigned to the workbook script property (specified by the ValuePropertyName setting) when the button is clicked.

The ValuePropertyName setting can specify a single property name or a semi-colon delimited list of property names. For each property name specified by the ValuePropertyName, a corresponding property value must be specified by the ButtonValuePropertyValue setting. When multiple property names and values are specified, the property value is assigned to the property identified by the corresponding property name.

See also: ValuePropertyName

CheckedInitializePropertyName

string

Indicates the name of the boolean workbook script property that is used to set whether a state button tool is checked or unchecked. If the property’s value is true, the tool is checked.

The state button tool’s checked state is initialized using the property’s value and the checked state is also automatically updated when the property’s value changes.

Setting the checked state with this property does not trigger the ToolClick event.

CheckedPropertyName

string

Indicates the name of the boolean workbook script property that is used to set whether a state button tool is checked or unchecked. If the property’s value is true, the tool is checked.

The state button tool’s checked state is initialized using the property’s value and the checked state is also automatically updated when the property’s value changes.

Setting the checked state with this property triggers the ToolClick event, which executes the procedure specified by the ProcedureName.

EnabledPropertyName

string

Indicates the name of the boolean workbook script property that is used to set whether the tool is enabled or disabled. If the property’s value is true, the tool is enabled.

The tool’s enabled state is initialized using the property’s value and the tool is also automatically enabled or disabled when the property’s value changes.

ProcedureName

string

Indicates the name of the workbook script procedure associated with the tool.

For a button and state button tool, the procedure is executed when the button is clicked. For a combobox tool, the procedure is executed when the value changed. For a textbox tool, the procedure is executed when edit mode is exited.

The Procedure tool argument is optional. The argument is only necessary when you want a procedure to execute in response to a tool event.

ToolCaption

string

Specifies the caption displayed on the context menu or toolbar.

The ToolCaption tool argument is optional. If no ToolCaption tool argument is specified, the tool’s Caption property is used.

The ToolCaption should be used when the caption only needs to be set when the tool is initialized.

ToolCaptionPropertyName

string

Indicates the name of the workbook script property that is used to set the caption displayed on the context menu or toolbar.

The ToolCaptionPropertyName should be used when the caption needs to be dynamically set based on logic within the workbook script.

ValuePropertyName

string

Indicates the name of the workbook script property whose value is automatically set when the state button tool, combobox tool, or textbox tool value changes or when a button tool is clicked.

For a state button tool, the boolean property’s value is set when the button is clicked. When the state button is checked, the value is true. When the button is unchecked, the value is false.

For a combobox tool, the property’s value is set when the combobox value changes.

For a textbox tool, the property’s value is set when edit mode is exited.

For a button tool, the property is set to the value specified by the ButtonValuePropertyValue setting when the button is clicked. The ValuePropertyName setting can specify a single property name or a semi-colon delimited list of property names. For each property name specified by the ValuePropertyName, a corresponding property value must be specified by the ButtonValuePropertyValue setting. When multiple property names and values are specified, the property value is assigned to the property identified by the corresponding property name.

VisibleOnContextMenuPropertyName

string

Indicates the name of the boolean workbook script property that is used to set whether a tool on the context menu is visible. If the property’s value is true, the tool is visible.

For a context menu tool, the visibility is set each time the context menu is displayed based on the property’s value.

VisibleOnToolbarPropertyName

string

Indicates the name of the boolean workbook script property that is used to set whether a tool on the toolbar is visible. If the property’s value is true, the tool is visible.

The tool’s visible state is initialized using the property’s value and the tool is also automatically shown or hidden when the property’s value changes.

WorkbookScriptID

string

Indicates the ID of the workbook script associated with the tool.

The WorkbookScriptID tool argument is optional. By default, the view’s WorkbookScriptID is used.