Let's say I have two macros in Excel. One for Refresh Data (get them via query from database), one for email sending.
Now, I have Master Macro, which looks like this:
Call RefreshAll
Application.Wait (Now + TimeValue("0:00:10"))
Call SendMail
I just needs to clarify my solution that it works this way when I run Master Macro: Call RefreshAll so data are loaded from database to Excel, wait 10 seconds so the query has enough time to load them all and then SendMail.
The reason why I am asking it seems it does not work properly (old data are sent, not the updated ones). Does the Application.Wait (Now + TimeValue("0:00:10")) also cause the query to pause? If so, how should I modify my code so it works as described solution I need?