Run 2 macros with OnAction

Excel Facts

Pivot Table Drill Down
Double-click any number in a pivot table to create a new report showing all detail rows that make up that number
SIMPLEST WAY

Code:
sub RunBoth()
  macro1
  macro2
end sub

sub Macro1()
  beep
end sub

sub Macro2()
  beep
end sub

or put both macros in a BUTTON CLICK event.
 
Upvote 0
Strictly speaking, VBA is single-threaded, so two macros cannot run at the same time.

On the other hand, you are talking about execution with one call, which can be done using the previous example or by calling the next macro at the end of the first macro. You could probably combine the macros, but then there is only one macro.

I would encourage you to provide more detailed information so that we can help. It would be best if you could share the macros in question here.
 
Upvote 0
Thanks for advising, in the end I just had to call another Sub which combines the 2 macros, as it looks like there isn't another option.
 
Upvote 0

Forum statistics

Threads
1,215,368
Messages
6,124,520
Members
449,169
Latest member
mm424

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top