Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4
Default 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...

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 32
Default 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...


Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Macro recording won't record mouse click of add-in app button bocabuilder Excel Discussion (Misc queries) 3 March 12th 09 07:47 PM
Macro Button does not work on second click retseort[_7_] Excel Programming 2 November 9th 05 10:12 PM
Call Userfor and click button with macro ExcelMonkey[_190_] Excel Programming 2 February 25th 05 04:41 PM
Can't start macro via button click dan Excel Programming 1 November 3rd 04 08:48 PM
How do I set a macro to run when I click a Command Button in Exce. thewizrd Excel Programming 1 October 8th 04 06:44 PM


All times are GMT +1. The time now is 03:45 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"