Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
How to assign a macro to a button
I have a procedure that consists of 4 subs, they are all saved in a module
"Update", the first sub calls out to the others in order. I would like to run this from a button on the spreadsheet. However when I create the button, and select 'view code' it creates a macro in the spreadsheet. Can this be redirected to run from the module or can I call my Update module from it, and please tell me how ??? |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
How to assign a macro to a button
I may have answered my own question Application.Run ("Update") will call
out and run the public sub in the module. But if there is a way to have the button run the module public sub without going through the worksheet sub, please let me know... Thanks... ========================================= "WANNABE" <breichenbach AT istate DOT com wrote in message ... I have a procedure that consists of 4 subs, they are all saved in a module "Update", the first sub calls out to the others in order. I would like to run this from a button on the spreadsheet. However when I create the button, and select 'view code' it creates a macro in the spreadsheet. Can this be redirected to run from the module or can I call my Update module from it, and please tell me how ??? |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
How to assign a macro to a button
Hi WANNABE
Enter the macro name in the click event of the button Private Sub CommandButton1_Click() Call yourMacroName End Sub Or use a button from the Forms toolbar you can right click on it and use Assign macro -- Regards Ron de Bruin http://www.rondebruin.nl "WANNABE" <breichenbach AT istate DOT com wrote in message ... I have a procedure that consists of 4 subs, they are all saved in a module "Update", the first sub calls out to the others in order. I would like to run this from a button on the spreadsheet. However when I create the button, and select 'view code' it creates a macro in the spreadsheet. Can this be redirected to run from the module or can I call my Update module from it, and please tell me how ??? |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Assign a macro to a button | Excel Discussion (Misc queries) | |||
How do I Assign Macro to a button? | Charts and Charting in Excel | |||
Assign macro to button | Excel Programming | |||
Assign macro to button | Excel Programming | |||
Assign button to run macro | Excel Programming |