Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Automatically assign a macro or code to a commandbutton

Status
Not open for further replies.

jadadad

Technical User
Jun 2, 2004
12
US
I have an Excel VBA code that automaically creates a commandbutton just fine. But, I'm having difficulity assigning an established macro to it or I'll even take assigning code to the button.

The one liner code is....Sheets(1).Activate

Thanks,
 
Take a look at the OnAction property of your CommandButton object

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ222-2244
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top