Perhaps this is a straightforward question, but I need to 100% verify this. I have a function (Execute) that calls different modules in order.. Like this:
Private Sub Execute()
Call Func1
Call Func2
Call Func3
End Sub
Functions 1 and 2 are quite complicated functions that draws and manipulates data. What is very important is that functions 1 and 2 are executed and completed prior to running function 3.
One way I do this currently is by forcing a 1 second lag prior function 3 to ensure 1 and 2 are finished, something like this:
Private Sub Execute()
Call Func1
Call Func2
Application.Wait (Now + TimeValue("0:00:01"))
Call Func3
End Sub
I am thinking of removing the 1 second lag - but I really want to make sure that functions are running and completing in a synchronized manner.
Thanks