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


How do I create a command button on my sheet to run a macro?


--
comotoman
------------------------------------------------------------------------
comotoman's Profile: http://www.excelforum.com/member.php...o&userid=27292
View this thread: http://www.excelforum.com/showthread...hreadid=473863

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,119
Default Creat a command button

There are 2 kinds of buttons. One comes from the forms toolbar and the other
comes from the control toolbox. They work a little different so I will
explain each.

Control Toolbox - This is the button I use 99% of the time. It is the most
fimilliar to people who are familliar with coding in VB. A button is embeded
right in the sheet and the code written lands in the sheet (not in a module).
Drag a button off the control toolbox and righ click on it. Select Properties
and here you can modify the look and function of the button There are lost of
choices. You deffinietly want to change name to something like cmdMyButton
and the caption to a description of the action the button does, like "Copy
Stuff". Right click on the button again and choose view code. Now you can
write code for the button to do.

Forms Toolbar - The button from this menu is more like a picture of a
button. When you add the button you will be promted to link it to a macro. It
could be any publicly declared procedure written in a module (recorded macros
qualify here). The buttons do not have as many options as the control toolbox
but they work in a pinch...
--
HTH...

Jim Thomlinson


"comotoman" wrote:


How do I create a command button on my sheet to run a macro?


--
comotoman
------------------------------------------------------------------------
comotoman's Profile: http://www.excelforum.com/member.php...o&userid=27292
View this thread: http://www.excelforum.com/showthread...hreadid=473863


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 button add another command Wanna Learn Excel Discussion (Misc queries) 5 December 7th 08 11:42 PM
Command Button Paul Excel Discussion (Misc queries) 1 April 4th 08 12:00 PM
How Do I Assign a Toolbar Button to a Custom Number Format I creat FuadsCurse Excel Discussion (Misc queries) 3 March 27th 06 09:44 PM
Command Button vs Control Button RGibson Excel Programming 1 October 14th 03 02:24 AM
Command Button vs Form Button T K Excel Programming 4 August 26th 03 07:26 PM


All times are GMT +1. The time now is 12:09 PM.

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

About Us

"It's about Microsoft Excel"