Link to home
Start Free TrialLog in
Avatar of Berry Metzger
Berry MetzgerFlag for United States of America

asked on

How to run the same macro from two ActiveX CommandButtons

Hello Experts,
I want to run the same macro assigned to CommandButton21 located on Sheet5 from a new, second CommandButton2 on Sheet 5.  Is there a way to "call" the macro without having to repeat (copy) the macro routine for the second CommandButton2?  Because the button toggles colors and changes text each time invoked, I don't want a solution using a shape.
Berry
SOLUTION
Avatar of Norie
Norie

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
ASKER CERTIFIED SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Berry Metzger

ASKER

This example code will work for me. Thanks for the example.  
I think Norie is saying the same thing, so I gave credit for the answer too.