Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I run XL2003
I have designed a button embedded in my worksheet. I want my new button to run a macro which I recorded. How do I assign a specific macro to a specific button? I don't want to customize a button on a menu! |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Of and running
"Fritz" wrote: I run XL2003 I have designed a button embedded in my worksheet. I want my new button to run a macro which I recorded. How do I assign a specific macro to a specific button? I don't want to customize a button on a menu! |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi Fritz,
You already have the button embedded, so go into Design Mode (on the Visual Basic toolbar - I expect you are already there considering you have the button). Then just double click that button and the Visual Basic editor should open in the worksheet module in the Click Event of the button that you created: Private Sub myButton_Click() End Sub You can either write your macro code in this sub, or call your macro from it: Private Sub myButton_Click() myMacro End Sub If your macro is contained in another module, make sure it isn't declared as Private, or the call from the Worksheet module won't find it. I think, by default, recorded macros aren't declared and are therefore public anyway. "Fritz" wrote: I run XL2003 I have designed a button embedded in my worksheet. I want my new button to run a macro which I recorded. How do I assign a specific macro to a specific button? I don't want to customize a button on a menu! |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Imbedded button to run macro | Excel Discussion (Misc queries) | |||
What is Fx buton in excel? | Excel Discussion (Misc queries) | |||
How to Check Empty Rows in Sheet2 when sheet1 buton clicked | Excel Programming | |||
Imbedded .pdf or .doc files | Excel Programming | |||
Custom buton for macro in an Addin file. | Excel Programming |