Tutorial by Examples

ProcedureName ProcedureName argument1, argument2 Call a procedure by its name without any parentheses. Edge case The Call keyword is only required in one edge case: Call DoSomething : DoSomethingElse DoSomething and DoSomethingElse are procedures being called. If the Call keyword was rem...
To retrieve the result of a procedure call (e.g. Function or Property Get procedures), put the call on the right-hand side of an assignment: result = ProcedureName result = ProcedureName(argument1, argument2) Parentheses must be present if there are parameters. If the procedure has no parameter...
Parentheses are used to enclose the arguments of function calls. Using them for procedure calls can cause unexpected problems. Because they can introduce bugs, both at run-time by passing a possibly unintended value to the procedure, and at compile-time by simply being invalid syntax. Run-time Re...
Call ProcedureName Call ProcedureName(argument1, argument2) The explicit call syntax requires the Call keyword and parentheses around the argument list; parentheses are redundant if there are no parameters. This syntax was made obsolete when the more modern implicit call syntax was added to VB. ...
Some procedures have optional arguments. Optional arguments always come after required arguments, but the procedure can be called without them. For example, if the function, ProcedureName were to have two required arguments (argument1, argument2), and one optional argument, optArgument3, it could b...

Page 1 of 1