ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Running Multiple Modules With 1 Command (https://www.excelbanter.com/excel-programming/289845-running-multiple-modules-1-command.html)

GARY

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!

Ken Wright

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



Rob van Gelder[_4_]

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!




All times are GMT +1. The time now is 10:16 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com