Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Marco and command buttons


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

  #2   Report Post  
Posted to microsoft.public.excel.programming
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



Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Command Buttons Hoyas07 Excel Discussion (Misc queries) 2 February 11th 08 03:42 PM
How to assign a marco to a command button Eric Excel Worksheet Functions 1 May 30th 05 12:44 AM
How can i assign a marco to a command button Chip Pearson Excel Programming 0 May 30th 05 12:24 AM
activate marco command Dominic Mak Excel Programming 2 April 10th 05 01:32 PM
Control Buttons vs. Command Buttons Robert Gibson Excel Programming 1 October 13th 03 04:33 PM


All times are GMT +1. The time now is 03:25 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"