cancel
Showing results for 
Search instead for 
Did you mean: 

Run multiple queries in workbook before vba code

Former Member
0 Kudos

Hi All,

I have a workbook with 2 queries, one on each tab that I need to run, then run some VBA code over both sheets. The issue I have is the VBA code is running after the first query finishes, not after both have finished.

Can anyone suggest a way of ensuring both queries finish before the VBA code starts?

Thanks for all assistance

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Stuart,

Just put a button in the workbook, where the VBA code will get executed once the button is pressed after the report is refreshed.

Answers (1)

Answers (1)

Former Member
0 Kudos

Thanks for your suggestion, the simplest ways are usually the best!

I was trying to find an automatic way but this works fine.

Thanks again.