I have one sub (Refresh-data) in excel that gets data via MS-query and the second sub (Format_Column) formats the column. How can I make sure that the first sub has finished before the second starts?
PHV's advice will work. Skip - even if you have the 2 subs run from a amin sub, the code can still be executing whilst the SQL is running so it could still mess up. Setting background query to false ensures that the code does not continue until after the query has been processed
Rgds, Geoff [blue]Si hoc signum legere potes, operis boni in rebus Latinus alacribus et fructuosis potiri potes![/blue]
Want the [red]best[/red] answers to your questions ? faq222-2244
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.