The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.
Call Statement (Visual Basic)
Transfers control to a
, Function , or dynamic-link library (DLL) procedure. Sub
[ Call ] procedureName [ (argumentList) ]
Required. Name of the procedure to call.
Optional. List of variables or expressions representing arguments that are passed to the procedure when it is called. Multiple arguments are separated by commas. If you include
argumentList, you must enclose it in parentheses.
You can use the
keyword when you call a procedure. For most procedure calls, you aren’t required to use this keyword. Call
You typically use the
keyword when the called expression doesn’t start with an identifier. Use of the Call keyword for other uses isn’t recommended. Call
If the procedure returns a value, the
statement discards it. Call
The following code shows two examples where the
keyword is necessary to call a procedure. In both examples, the called expression doesn't start with an identifier. Call
Call ( Sub() Console.Write( "Hello"))()
Call New TheClass().ShowText()
Public Sub ShowText()
Console.Write( " World")
( 1500 characters remaining)
Thank you for your feedback