Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default Invoking a macro from within another

Can't figure this out.

I want a macro to run another macro or several other macros. How do you do
it?

Thanks...I know this should be simple, but I can't find the solution
anywhere.


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 244
Default Invoking a macro from within another

Sub RunMacro
MyTest
MyOutput
end sub

sub MyTest
msgbox "this is my test"
end sub

sub MyOutput
msgbox "this is my output"
end sub


in other words, just put the name of the sub and it will run.

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Invoking a macro from within another


Hi

It is literally as simple as:

Sub MyMacro()
MyOtherMacro
End Sub

Sub MyOtherMacro()
Msgbox "Hello, World!"
End Sub

You don't need to use the Call statement.

Hope this helps!

Richard


--
RichardSchollar
------------------------------------------------------------------------
RichardSchollar's Profile: http://www.excelforum.com/member.php...o&userid=34698
View this thread: http://www.excelforum.com/showthread...hreadid=546683

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default Invoking a macro from within another

Thanks - that was easy.


"jnsaunders" wrote in message
...
Can't figure this out.

I want a macro to run another macro or several other macros. How do you do
it?

Thanks...I know this should be simple, but I can't find the solution
anywhere.



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
Invoking macro to insert rows according to DDE imported data chainastole New Users to Excel 1 June 2nd 07 01:49 AM
Invoking macro when a tab is selected MicroMain Excel Programming 2 January 18th 06 05:51 AM
Switching woorkbooks & and invoking a macro from within a macro Bob Benjamin Excel Programming 8 January 11th 04 02:12 AM
Excel Macro Code invoking InputBox. Andrew Thorne Excel Programming 0 July 30th 03 10:23 PM


All times are GMT +1. The time now is 11:04 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"