LOTUSSCRIPT LANGUAGE
For applications developed with some Lotus products, such as 1-2-3®, you can use names in brackets rather than object reference variables to identify Lotus software objects. To determine whether your Lotus software supports this notation, see the product documentation.
Syntax
[prodObjName]
Elements
prodObjName
In some cases, Lotus products assign names to objects, and in other cases you can use the product user interface to name the objects you create. In a spreadsheet, for example, A1 identifies a particular cell, and you could use the user interface to name a chart SalesTracking.
Bracket notation lets you use these names without declaring an object variable and binding it to the object. For example, the product might allow you to use:
[A1].contents = Cstr(247000)
instead of:
Dim myCell as Range Set myCell = Bind("A1") mycell.contents = Cstr(247000)
In some cases, the product uses bracket notation when it records transcripts of user actions. This makes the transcripts easier to read and modify. For more information, see the product documentation.
The LotusScript compiler does not attempt to determine the class of objects that are identified with bracket notation, so any class syntax errors you make (such as the incorrect use of properties and other methods), will generate run-time errors, not compile-time errors.
You can also use empty brackets to identify the currently selected product object. Empty brackets are equivalent to leading dot notation. For example, if the current selection is a range named Sales, then
[ ].CopyToClipboard
and
.CopyToClipboard
are equivalent to
[Sales].CopyToClipboard
All three statements copy the contents of the Sales range to the clipboard.
To include square brackets as text within a string, double the brackets. For example, if the current selection is a range named Sales[East], use the following syntax:
[Sales[[East]]].CopyToClipboard
Example See Also