Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
re : Possible to run private sub macros by writing another private
Hi all,
I have 7 private subs ... all linked to indiviudal command button. 7 Private sub listed below :- 1) LGC01 2) LGC02 3) LGC03 4) LGC04 5) LGC05 6) LGC06 7) LGC07 I want to write another PRIVATE sub to run all the private subs LGC01, 02, 03, 04 ,05 ,06 and 07 together ... can it be done??? |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
re : Possible to run private sub macros by writing another private
Hi, Assuming these subs have no parameters: Sub RunAll() LGC01 LGC02 LGC03 LGC04 LGC05 LGC06 LGC07 End Sub -- Regards, Sébastien <http://www.ondemandanalysis.com "ddiicc" wrote: Hi all, I have 7 private subs ... all linked to indiviudal command button. 7 Private sub listed below :- 1) LGC01 2) LGC02 3) LGC03 4) LGC04 5) LGC05 6) LGC06 7) LGC07 I want to write another PRIVATE sub to run all the private subs LGC01, 02, 03, 04 ,05 ,06 and 07 together ... can it be done??? |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
re : Possible to run private sub macros by writing another pri
Hi Sebastienm,
Let say I have 3 different private sub stated below 1) Private Sub AllModelsLGC011stAndFinalPass_Click() End Sub 2) Private Sub AllModelsLGC021stAndFinalPass_Click() End Sub 3) Private Sub AllModelsLGC031stAndFinalPass_Click() End sub All these private sub contains VB codes in it. What I would like to do now is to write another private sub to run all these private sub... so how should go abt writing it? "sebastienm" wrote: Hi, Assuming these subs have no parameters: Sub RunAll() LGC01 LGC02 LGC03 LGC04 LGC05 LGC06 LGC07 End Sub -- Regards, Sébastien <http://www.ondemandanalysis.com "ddiicc" wrote: Hi all, I have 7 private subs ... all linked to indiviudal command button. 7 Private sub listed below :- 1) LGC01 2) LGC02 3) LGC03 4) LGC04 5) LGC05 6) LGC06 7) LGC07 I want to write another PRIVATE sub to run all the private subs LGC01, 02, 03, 04 ,05 ,06 and 07 together ... can it be done??? |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
re : Possible to run private sub macros by writing another pri
You would just do:
Sub RunAll() AllModelsLGC011stAndFinalPass_Click AllModelsLGC021stAndFinalPass_Click AllModelsLGC031stAndFinalPass_Click End Sub -- Running RunAll would execute each of these subs one after each other. Regards, Sébastien <http://www.ondemandanalysis.com "ddiicc" wrote: Hi Sebastienm, Let say I have 3 different private sub stated below 1) Private Sub AllModelsLGC011stAndFinalPass_Click() End Sub 2) Private Sub AllModelsLGC021stAndFinalPass_Click() End Sub 3) Private Sub AllModelsLGC031stAndFinalPass_Click() End sub All these private sub contains VB codes in it. What I would like to do now is to write another private sub to run all these private sub... so how should go abt writing it? "sebastienm" wrote: Hi, Assuming these subs have no parameters: Sub RunAll() LGC01 LGC02 LGC03 LGC04 LGC05 LGC06 LGC07 End Sub -- Regards, Sébastien <http://www.ondemandanalysis.com "ddiicc" wrote: Hi all, I have 7 private subs ... all linked to indiviudal command button. 7 Private sub listed below :- 1) LGC01 2) LGC02 3) LGC03 4) LGC04 5) LGC05 6) LGC06 7) LGC07 I want to write another PRIVATE sub to run all the private subs LGC01, 02, 03, 04 ,05 ,06 and 07 together ... can it be done??? |
#5
Posted to microsoft.public.excel.programming
|
|||
|
|||
re : Possible to run private sub macros by writing another private
Yes you can, if all 7 and the new private subs are located in the same module... ddiicc Wrote: Hi all, I have 7 private subs ... all linked to indiviudal command button. 7 Private sub listed below :- 1) LGC01 2) LGC02 3) LGC03 4) LGC04 5) LGC05 6) LGC06 7) LGC07 I want to write another PRIVATE sub to run all the private subs LGC01, 02, 03, 04 ,05 ,06 and 07 together ... can it be done??? -- T-®ex ------------------------------------------------------------------------ T-®ex's Profile: http://www.excelforum.com/member.php...o&userid=26572 View this thread: http://www.excelforum.com/showthread...hreadid=399339 |
#6
Posted to microsoft.public.excel.programming
|
|||
|
|||
re : Possible to run private sub macros by writing another private
You can write something like: Private Sub RunAllThree() AllModelsLGC011stAndFinalPass_Click AllModelsLGC021stAndFinalPass_Click AllModelsLGC031stAndFinalPass_Click End Sub That is, if you're only interested in executing the codes in the subs... :) ddiicc Wrote: Hi Sebastienm, Let say I have 3 different private sub stated below 1) Private Sub AllModelsLGC011stAndFinalPass_Click() End Sub 2) Private Sub AllModelsLGC021stAndFinalPass_Click() End Sub 3) Private Sub AllModelsLGC031stAndFinalPass_Click() End sub All these private sub contains VB codes in it. What I would like to do now is to write another private sub to run al these private sub... so how should go abt writing it? "sebastienm" wrote: Hi, Assuming these subs have no parameters: Sub RunAll() LGC01 LGC02 LGC03 LGC04 LGC05 LGC06 LGC07 End Sub -- Regards, Sébastien <http://www.ondemandanalysis.com "ddiicc" wrote: Hi all, I have 7 private subs ... all linked to indiviudal command button. 7 Private sub listed below :- 1) LGC01 2) LGC02 3) LGC03 4) LGC04 5) LGC05 6) LGC06 7) LGC07 I want to write another PRIVATE sub to run all the private sub LGC01, 02, 03, 04 ,05 ,06 and 07 together ... can it be done?? -- T-®e ----------------------------------------------------------------------- T-®ex's Profile: http://www.excelforum.com/member.php...fo&userid=2657 View this thread: http://www.excelforum.com/showthread.php?threadid=39933 |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
How can I see/edit my Private macros i VB? | Excel Discussion (Misc queries) | |||
Private Sub - Hot key? | Excel Programming | |||
private sub | Excel Programming | |||
Private sub | New Users to Excel | |||
Private Sub Running Other Private Sub Inadvertently | Excel Programming |