View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Tom Ogilvy Tom Ogilvy is offline
external usenet poster
 
Posts: 27,285
Default Marco and command buttons

put the sheet in design mode by clicking the control toolbox toolbar upper
left button. Then double click on the command button or right click on it
and select view code. You will want to see code like

Private Sub CommandButton1_Click()
Test1
End Sub


or move all the code but the declaration and end statement in the Click
event.

--
Regards,
Tom Ogilvy

"sarasotavince"
wrote in message
news:sarasotavince.21anja_1136686802.021@excelforu m-nospam.com...

If I have recorded a macro and saved it as test1 and want to run the
macro from a command button, how do I associate the saved macro test1
with the button? Thanks.


--
sarasotavince
------------------------------------------------------------------------
sarasotavince's Profile:

http://www.excelforum.com/member.php...o&userid=30237
View this thread: http://www.excelforum.com/showthread...hreadid=499104