Data Type: n/a
The name of the subroutine being called.
Data Type: Any
A comma-delimited list of arguments to pass to the subroutine being called.
Passes program control to an explicitly named procedure or function.
requires that the procedure being called be named explicitly.
You cannot assign the subroutine name to a variable and provide
that as an argument to the
Call statement. For example, the
following is an illegal use of
Dim sProc sProc = "PrintRoutine" Call sProc(sReport) ' Illegal: sProc is a variable
The following code fragment shows a valid use of the
Call PrintRoutine(sReport) ' Legal usage
You aren’t required to use the
Call keyword when calling a function
procedure. However, if you use the
Call keyword to call a procedure that
be enclosed in parentheses. If you omit the
Call keyword from the procedure call,
you must also omit the parentheses around
The WSH code fragment shows a call to a procedure that passes
two arguments: a string array and a string. Note that while the call
to the ShowList procedure uses the
Call keyword, the equivalent call to the
MsgBox function within the
ShowList procedure does not:
Dim aList, sCaption aList = Array("One", "Two", "Three", "Four") sCaption = "Array Contents" Call ShowList(aList, sCaption) Sub ShowList(arr( ...