Multiple Query in once button in same sheet

Closed
Raju - 24 Jun 2016 à 14:38
vcoolio Posts 1411 Registration date Thursday 24 July 2014 Status Contributor Last seen 6 September 2024 - 25 Jun 2016 à 04:00
Hello all,

I have created two separate queries in excel VBA. I have given two different buttons for both queries and both are running successfully.

I want to execute both queries in once button. Could anybody hep me on this?



Related:

1 response

vcoolio Posts 1411 Registration date Thursday 24 July 2014 Status Contributor Last seen 6 September 2024 262
25 Jun 2016 à 04:00
Hello Raju,

By queries I assume that you mean macros. If so, you can have your main macro call the other one just by placing the name of the second macro (without the parentheses) just above End Sub in the main macro.

For example:-

Sub MainMacro()
'your code here

'Second Macro Name here ---->No parentheses needed.
End Sub


I hope that this helps.

Cheerio,
vcoolio.