Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Macro to Click Button?
I can't figure out how to reference macro subs to macro subs (If
Possible???). I want to write a macro to an object that if selected, also runs the attached macro to a seperate object. My goal in this is to limit the amount of code in my spreadsheet by referencing code already written. I may be going about this all wrong, please give me some sugestions. What I need is a macro that will click button A if I click button B... |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Macro to Click Button?
Like...
Sub MacroA() 'Your Code Call MacroB End Sub ? HTH Die_Another_Day wrote: I can't figure out how to reference macro subs to macro subs (If Possible???). I want to write a macro to an object that if selected, also runs the attached macro to a seperate object. My goal in this is to limit the amount of code in my spreadsheet by referencing code already written. I may be going about this all wrong, please give me some sugestions. What I need is a macro that will click button A if I click button B... |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Macro to Click Button?
Tight! Perfect.
Die_Another_Day wrote: Like... Sub MacroA() 'Your Code Call MacroB End Sub ? HTH Die_Another_Day wrote: I can't figure out how to reference macro subs to macro subs (If Possible???). I want to write a macro to an object that if selected, also runs the attached macro to a seperate object. My goal in this is to limit the amount of code in my spreadsheet by referencing code already written. I may be going about this all wrong, please give me some sugestions. What I need is a macro that will click button A if I click button B... |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
Macro to Click Button?
Hi,
provided you have a UserForm1 with ButtonA and ButtonB on it. Now you want to trigger the click-event of ButtonB when actually clicking on ButtonA. Try the following Private Sub ButtonA_Click() 'Your code for this event UserForm1.ButtonB.Value = True End Sub Regards, Ingolf schrieb: I can't figure out how to reference macro subs to macro subs (If Possible???). I want to write a macro to an object that if selected, also runs the attached macro to a seperate object. My goal in this is to limit the amount of code in my spreadsheet by referencing code already written. I may be going about this all wrong, please give me some sugestions. What I need is a macro that will click button A if I click button B... |
#5
Posted to microsoft.public.excel.programming
|
|||
|
|||
Macro to Click Button?
Private Sub ButtonA_Click()
'Your code for this event ButtonB_Click End Sub HTH -- AP a écrit dans le message de news: ... I can't figure out how to reference macro subs to macro subs (If Possible???). I want to write a macro to an object that if selected, also runs the attached macro to a seperate object. My goal in this is to limit the amount of code in my spreadsheet by referencing code already written. I may be going about this all wrong, please give me some sugestions. What I need is a macro that will click button A if I click button B... |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Macro recording won't record mouse click of add-in app button | Excel Discussion (Misc queries) | |||
Macro Button does not work on second click | Excel Programming | |||
Call Userfor and click button with macro | Excel Programming | |||
Can't start macro via button click | Excel Programming | |||
How do I set a macro to run when I click a Command Button in Exce. | Excel Programming |