Objects in calculations

<< Click to Display Table of Contents >>

Objects in calculations

Certain types of objects can also be used in calculations. Thus, for example, you can create a form that contains text fields and use the contents of these text fields in calculations.

All objects in a document have unique names as described in Changing the names of objects. In calculations, you can address each object by its name. Textbox1, for example, returns the contents of the text field "Textbox1".

You evaluate the content of objects in calculations as follows:

Text fields and text frames

Textbox1.Text (or Textbox1 for short) returns the content of the text box named "Textbox1" as text (without formatting).
Textbox1.Value, on the other hand, interprets the content of this text field as a number and returns it.

Tables

Table1.A1 returns the content of cell A1 in Table1.
Table1.#A1 interprets the content of this cell as a number and returns it.
Table1.$A1 interprets the content of this cell as text and returns it.
Table1 returns the value of the first cell of Table1.

Checkboxes and checkbox frames

Checkbox1.Sel (or Checkbox1 for short) returns 1 if the checkbox is checked or 0 if it is not checked.
Checkbox1.Text returns the text of this checkbox if it is checked, otherwise it returns an empty string.

Dropdown lists and dropdown list frames

Dropdown1.Text returns the text of the selected item in Dropdown1.
Dropdown1.Sel (or Dropdown1 for short) returns the number of the selected item.

For example, the formula "Textbox1.Value * 2" reads the numeric value in the text field named "Textbox1" and multiplies it by two.