Link to home
Start Free TrialLog in
Avatar of leekk
leekk

asked on

assigning a macro to a button from within a macro

I have a macro that creates a custom button on the toolbar. I want it to be automatically assigned to another macro.  Here's the code:

Dim msoButton As CommandBarButton

Set msoButton=Application.CommandBars("standard").Controls.
Add(msoControlButton, 2950, , 4)
   
I tried:

msoButton.OnAction = call print_claim
msoButton.Execute = print_claim
etc
etc

Nothing works.  Please help?    
ASKER CERTIFIED SOLUTION
Avatar of shalbe
shalbe

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