Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 42
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 694
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 42
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 694
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default 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
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
How can I see/edit my Private macros i VB? Ace70 Excel Discussion (Misc queries) 1 June 13th 07 10:02 AM
Private Sub - Hot key? Arturo Excel Programming 1 June 23rd 05 07:17 PM
private sub JT Excel Programming 3 June 3rd 05 10:14 PM
Private sub Mark New Users to Excel 3 April 6th 05 03:36 PM
Private Sub Running Other Private Sub Inadvertently Ross Culver Excel Programming 2 February 10th 05 07:17 PM


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