call verses run

  • Thread starter Thread starter Brett
  • Start date Start date
B

Brett

Apart from the way arguments are set out, and whether or not a return value
is required, is there any other difference between "Call" and "Run" please?
Regards, Brett
 
The best place is to refer is VBA help.

RUN is a 'Method' which allows values to be passed but not named variables
or objects. The objects will be converted to its value. RUN method returns
whatever the macro returns.

Meanwhile CALL is a 'statement' ; if used will transfer the control to the
procedure/function. Even without using CALL you can still call the procedure
but if you use the Call keyword then that requires arguments to be passed
enclosed in parentheses.

CALL MyProc(arg1,arg2)
OR
MyProc arg1,arg2

If this post helps click Yes
 
Thanks again Jacob.

Jacob Skaria said:
The best place is to refer is VBA help.

RUN is a 'Method' which allows values to be passed but not named variables
or objects. The objects will be converted to its value. RUN method returns
whatever the macro returns.

Meanwhile CALL is a 'statement' ; if used will transfer the control to the
procedure/function. Even without using CALL you can still call the procedure
but if you use the Call keyword then that requires arguments to be passed
enclosed in parentheses.

CALL MyProc(arg1,arg2)
OR
MyProc arg1,arg2

If this post helps click Yes
 
Back
Top