Click a Command Button using vba

spq24

Board Regular
Joined
Jan 18, 2010
Messages
52
I have a series of command buttons lined up one after the other. Each controlling a different macro. When macro 1 is done I want it to click on the command button for macro 2

so:
user clicks command button 1
Macro 1 runs
Command Button 2 is automatically clicked on after Macro 1 is done running
Macro 2 runs (controlled by command button 2)

Any help much appreciated thanks!
 

Excel Facts

Excel Joke
Why can't spreadsheets drive cars? They crash too often!
I have a series of command buttons lined up one after the other. Each controlling a different macro. When macro 1 is done I want it to click on the command button for macro 2

so:
user clicks command button 1
Macro 1 runs
Command Button 2 is automatically clicked on after Macro 1 is done running
Macro 2 runs (controlled by command button 2)

Any help much appreciated thanks!

Would it be practicle for your purposes to just call Macro 2 at the end of Macro 1?
 
Upvote 0
calling the button hasn't worked out for me. I'm using the Application.Run (["macro1"]) and thats working
 
Upvote 0

Forum statistics

Threads
1,224,517
Messages
6,179,233
Members
452,898
Latest member
Capolavoro009

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