Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]() 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
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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 |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
command button add another command | Excel Discussion (Misc queries) | |||
Command Button | Excel Discussion (Misc queries) | |||
How Do I Assign a Toolbar Button to a Custom Number Format I creat | Excel Discussion (Misc queries) | |||
Command Button vs Control Button | Excel Programming | |||
Command Button vs Form Button | Excel Programming |