Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.misc
|
|||
|
|||
Macro to button
I know how to design a button, and I know how to record a macro but I can't
figure out how to attach the macro to the button? |
#2
Posted to microsoft.public.excel.misc
|
|||
|
|||
Macro to button
Fritz,
In order to attach a macro to your button, open the Visual Basic editor (Shift-F11) then click on the sheet containing the button, then click the down arrow of the combobox showing General, and select your button. Normally Excel will create a new routine called Private Sub CommandButton1_Click(). Simply insert the name of your macro with ventual parameters below that line. If you want to associate your macro to another event of this button, select the event on the second combobox at the top. Stephane. |
#3
Posted to microsoft.public.excel.misc
|
|||
|
|||
Macro to button
Fritz,
Right click on any blank area of the "Menu bar" and choose "Customize..." In the resulting "Customize" dialog box with the "Commands" tab selected under "Categories:" choose "Macros" In the right hand pane, drag the smiley face button to where ever you want it on your menu bar or in your menus. DO NOT close the "Customize" dialog box. Right click the new smiley button, at the bottom of the list is "Assign Macro..." The "Assign Macro" dialog box opens with your list of macros to choose form. Hope this helps. -Kevin "Fritz" wrote in message ... I know how to design a button, and I know how to record a macro but I can't figure out how to attach the macro to the button? |
#4
Posted to microsoft.public.excel.misc
|
|||
|
|||
Macro to button
I don't think this is what I want. I want to design/draw my own "box" on a
woorksheet. Then I want to assign a macro to it to print the "print area" of the work sheet. "Kevin" wrote: Fritz, Right click on any blank area of the "Menu bar" and choose "Customize..." In the resulting "Customize" dialog box with the "Commands" tab selected under "Categories:" choose "Macros" In the right hand pane, drag the smiley face button to where ever you want it on your menu bar or in your menus. DO NOT close the "Customize" dialog box. Right click the new smiley button, at the bottom of the list is "Assign Macro..." The "Assign Macro" dialog box opens with your list of macros to choose form. Hope this helps. -Kevin "Fritz" wrote in message ... I know how to design a button, and I know how to record a macro but I can't figure out how to attach the macro to the button? |
#5
Posted to microsoft.public.excel.misc
|
|||
|
|||
Macro to button
You can use any object you want and assign a macro to it.
A picture, a piece of Wordart, a button from the Forms Toolbar, a drawing from the Drawing toolbar, a photo of your mother................. Gord Dibben MS Excel MVP On Sat, 21 Jul 2007 15:46:00 -0700, Fritz wrote: I don't think this is what I want. I want to design/draw my own "box" on a woorksheet. Then I want to assign a macro to it to print the "print area" of the work sheet. "Kevin" wrote: Fritz, Right click on any blank area of the "Menu bar" and choose "Customize..." In the resulting "Customize" dialog box with the "Commands" tab selected under "Categories:" choose "Macros" In the right hand pane, drag the smiley face button to where ever you want it on your menu bar or in your menus. DO NOT close the "Customize" dialog box. Right click the new smiley button, at the bottom of the list is "Assign Macro..." The "Assign Macro" dialog box opens with your list of macros to choose form. Hope this helps. -Kevin "Fritz" wrote in message ... I know how to design a button, and I know how to record a macro but I can't figure out how to attach the macro to the button? |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Using Macro to sort without clicking on macro button | Excel Discussion (Misc queries) | |||
Macro Button | Excel Worksheet Functions | |||
Cannot see macro behind button? | Excel Discussion (Misc queries) | |||
use macro button to run macro in protected sheet | Excel Discussion (Misc queries) | |||
F9 Button Macro | Excel Discussion (Misc queries) |