Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default how do I create a macro that will activate other macros?

I am trying to create a Macro that will click on controls that have macros
assigned, this isn't working so I want to know if there is a way to nest the
sub's into this macro.
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 772
Default how do I create a macro that will activate other macros?

If you will put your macro's as functions or subs into a module (right click
your project and insert module) then you can call them from anywhere. example
Function CountStuff()
code
End Function
then under your click event,and anywhere else, just call CountStuff() and it
will run that code.

--
-John
Please rate when your question is answered to help us and others know what
is helpful.


"sbrigham" wrote:

I am trying to create a Macro that will click on controls that have macros
assigned, this isn't working so I want to know if there is a way to nest the
sub's into this macro.

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,939
Default how do I create a macro that will activate other macros?

The standard way to do this is not to click on the other controls but rather
to run the code associated with those controls. So something like this...

sub LotsOfStuff()
Call DoThis
Call DoThat
end sub

sub DoThis()
msgbox "do this"
end sub

sub DoThat
msgbox "do that"
end sub

--
HTH...

Jim Thomlinson


"sbrigham" wrote:

I am trying to create a Macro that will click on controls that have macros
assigned, this isn't working so I want to know if there is a way to nest the
sub's into this macro.

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default how do I create a macro that will activate other macros?

Thank you! I was missing the call part.

"Jim Thomlinson" wrote:

The standard way to do this is not to click on the other controls but rather
to run the code associated with those controls. So something like this...

sub LotsOfStuff()
Call DoThis
Call DoThat
end sub

sub DoThis()
msgbox "do this"
end sub

sub DoThat
msgbox "do that"
end sub

--
HTH...

Jim Thomlinson


"sbrigham" wrote:

I am trying to create a Macro that will click on controls that have macros
assigned, this isn't working so I want to know if there is a way to nest the
sub's into this macro.

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
Can a combo box activate different macros Carrie Excel Discussion (Misc queries) 1 June 5th 06 06:34 PM
Merge simple macros to create Complex macro oberon.black Excel Programming 7 September 2nd 05 05:02 PM
How do I create a macro that will activate the solver? Hjalti Excel Programming 3 January 13th 05 09:09 AM
Macro To Create Other Macros And Buttons Robert P. Stearns Excel Programming 0 January 6th 04 04:35 PM
Recording macro to activate other macros yippy[_2_] Excel Programming 4 January 6th 04 02:57 PM


All times are GMT +1. The time now is 09:43 AM.

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

About Us

"It's about Microsoft Excel"