Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 16
Default Running Multiple Modules With 1 Command

Would anybody have any idea how to use one procedure to run multiple number of modules at one time. I have ~13 different modules and need to call the modules in various combinations. Many thanks!
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,236
Default Running Multiple Modules With 1 Command

Gary,

Modules do not run. Procedures and Functions within Modules run.

If a procedure within a module has the same name as a procedure in another
module, then you can qualify procedures with the module name. eg.

Sub Test()
Module1.RunMeForEffect()
Module2.RunMeForEffect()
End Sub

Within Module 1:
Sub RunMeForEffect()
MsgBox "Message Box 1"
End Sub

Within Module 2:
Sub RunMeForEffect()
MsgBox "Message Box 2"
End Sub



--
Rob van Gelder - http://www.vangelder.co.nz/excel


"Gary" wrote in message
...
Would anybody have any idea how to use one procedure to run multiple

number of modules at one time. I have ~13 different modules and need to
call the modules in various combinations. Many thanks!


  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 634
Default Running Multiple Modules With 1 Command

Perhaps something like:-

Sub Master()

If x 10 Then
Call Sub1
Call Sub5
Call Sub3
Call Sub2
Call Sub4

Else
Call Sub2
Call Sub1
Call Sub3
Call Sub4
Call Sub5
End If

End Sub

Don't really need the Calls but makes it obvious what you are doing.

--
Regards
Ken....................... Microsoft MVP - Excel
Sys Spec - Win XP Pro / XL 00/02/03

----------------------------------------------------------------------------
It's easier to beg forgiveness than ask permission :-)
----------------------------------------------------------------------------



"Gary" wrote in message
...
Would anybody have any idea how to use one procedure to run multiple number of

modules at one time. I have ~13 different modules and need to call the modules
in various combinations. Many thanks!


---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.576 / Virus Database: 365 - Release Date: 30/01/2004


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
Command to make a forumula fron not running boxterduke Excel Discussion (Misc queries) 2 November 3rd 08 09:46 PM
using forms and modules in multiple workbooks scrabtree23[_2_] Excel Programming 1 November 11th 03 10:57 PM
Running Access MAcros or VB modules in Excel Nick Excel Programming 0 October 28th 03 06:27 AM
Problem with VB running from a command button Tim Marsh[_2_] Excel Programming 3 July 31st 03 11:14 AM
running all modules Jessi Excel Programming 1 July 29th 03 08:31 PM


All times are GMT +1. The time now is 08:12 PM.

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"