Called subroutine controls
I was readking that a "CALL" subroutine statement transfers control to the subroutine.
My question is: does that mean the VBA code will wait for that subroutine to complete before continuing on with its code?
{Example:)
main code
Call RTN_A
code
code
exit
RTN_A
code
In some code I wrote which works OK, I added a 5 second wait in the main code to allow the subroutine code to complete.
Application.Wait(Now + TimeValue("00:00:05")
Is this unnecessary?
Or if the call statement says, run this subroutine and continues on without waiting for it to complete, then I need the WAIT statement in my case.
|