GetValue Method

The GetValue method returns the value bound to a symbolic name in the Worksheet object. The binding returned is the bottommost binding in the worksheet.

Syntax

VT_DISPATCH = objMC.GetValue(Name As String)

Element

Description

VT_DISPATCH

A value object.

objMC

A Mathcad worksheet object.

Name

The name of the variable to bind.

Remarks

The GetValue method can fail if the there is a problem finding the variable binding. It can also crash the worksheet when used in a Mathcad scripted component in the case where there are multiple bindings of the same variable name. If the GetValue method is used in a scripted component, the variable name must also be supplied as an input to the component, and must appear only once in the document.

It is possible to reference greek character names as well as roman characters. Greek-to-Roman character mappings can be found in Mathcad Help, as entered in Mathcad via the "[char] and [CTRL]G" method. To escape any letter manually, just use the backslash character followed by the Roman equavalent as published in the table. Use a single quote character for prime (no backslash necessary).

In languages like JScript which treat the backslash as a special character, the backslashes need to be doubled. This is not necessary for VBScript.

VBScript Examples: