Controls > Advanced Controls > Checkbox > Example: Checkbox
Example: Checkbox
In this example, you can change the calculation results based on a selection in a checkbox.
1. On the Input/Output tab, in the Controls group, click Advanced > Checkbox.
2. Enter the output variable name for the Checkbox on the left side of the definition operator.
3. To change the properties and behavior of the Checkbox, follow the steps:
a. Right-click the Checkbox and select Edit.
b. Select the Properties tab.
c. Edit the Name property.
d. Click Close.
Click to copy this expression
Alternatively, you can edit the properties using the script.
* 
Copy this example to your PTC Mathcad Prime worksheet to see the script in VBscript that was used here.
4. Define a function:
Click to copy this expression
5. Evaluate the solution based on different selections of the checkbox.
Click to copy this expression
Click to copy this expression
6.  The example above is in VBscript. Copy the following example to see the script in Jscript.
Click to copy this expression
Was this helpful?