Method Calls

<< Click to Display Table of Contents >>

 

Method Calls

Many pre-defined methods contain parameters, which can be passed on method's call. For this, VBScript has a rule that must be followed. If a method is used in an assignment, its parameters must be enclosed in brackets, as in this example of a GetObject method's call.

obj = Application.GetObject("data.tag001")

 

If a method is called alone, then users must remove the brackets, as in this example of a SetVariableValue method's call.

Screen.Item("Query").SetVariableValue Value, 12

 

Brackets used when citing methods in this document are used only as an indication to differentiate them from properties. In scripts, this rule must be followed.

Was this page useful?