Job Stream Functions

  • Thread starter Thread starter David Reynolds
  • Start date Start date
D

David Reynolds

Guest
How do you force VBA functions to run in such a way that each consecutive function does not execute until the previous function call has fully completed ? VBA tends to run multiple function calls in parallel rather than in sequence. Must you use macro calls to accomplish this ? Or is there some other feature within VBA modules that enable you to run functions in sequence ?
 
Sorry, there is nothing like "synchronize" (JAVA) for VBA.

VBA is meant to do multi-tasking, e.g. organize timerEvents and (Mouse-)ClickEvents and so on.

Maybe you use something like this (not in sub or function, but in header of module):

Public varExecutingFunctionName as Variant

When starting a function you can insert:

if not(isnull(varExecutingFunctionName)) then exit function
 
Isn't this what DoEvents does?
 

Users who are viewing this thread

Back
Top Bottom