#1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 14
Default Subs

I had one rather large sub that worked great, I broke down into 8 seperate
subs to simplify code changes later on.I have a user form with a run button.
Originally it ran the one sub and worked great.Now with it split into many
how do I go from one sub straight into the next one until all are run??? This
is what the code looks like with just one of the subs listed.
Thanks in advance,
Donna C.

Private Sub RUN_Click()
ThisWorkbook.Worksheets.Add
Questions
Me.Hide
Unload Test
End Sub
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,290
Default Subs

As long as all of the subs are in standard modules...

Private Sub RUN_Click()
ThisWorkbook.Worksheets.Add
Questions
Me.Hide
Unload Test
OtherSub2
OtherSub3

OtherSub4
OtherSub5

OtherSub6
OtherSub7

OtherSub8
End Sub
--
Jim Cone
San Francisco, USA
http://www.realezsites.com/bus/primitivesoftware



"Donna C"
wrote in message
I had one rather large sub that worked great, I broke down into 8 seperate
subs to simplify code changes later on.I have a user form with a run button.
Originally it ran the one sub and worked great.Now with it split into many
how do I go from one sub straight into the next one until all are run??? This
is what the code looks like with just one of the subs listed.
Thanks in advance,
Donna C.

Private Sub RUN_Click()
ThisWorkbook.Worksheets.Add
Questions
Me.Hide
Unload Test
End Sub
  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 14
Default Subs

Well I tried your suggestion. It seems to be locking up with an error stating
"sub or function not defined" and highlites
Questions
???Any suggestions
Thanks Donna C.


"Jim Cone" wrote:

As long as all of the subs are in standard modules...

Private Sub RUN_Click()
ThisWorkbook.Worksheets.Add
Questions
Me.Hide
Unload Test
OtherSub2
OtherSub3

OtherSub4
OtherSub5

OtherSub6
OtherSub7

OtherSub8
End Sub
--
Jim Cone
San Francisco, USA
http://www.realezsites.com/bus/primitivesoftware



"Donna C"
wrote in message
I had one rather large sub that worked great, I broke down into 8 seperate
subs to simplify code changes later on.I have a user form with a run button.
Originally it ran the one sub and worked great.Now with it split into many
how do I go from one sub straight into the next one until all are run??? This
is what the code looks like with just one of the subs listed.
Thanks in advance,
Donna C.

Private Sub RUN_Click()
ThisWorkbook.Worksheets.Add
Questions
Me.Hide
Unload Test
End Sub

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,290
Default Subs

It is your code not mine...
What is "Questions"?
If it is a sub routine name, the sub should be in the same module as
the Run_Click sub or in a standard module. (as should all of the subs)
Jim Cone


"Donna C"
wrote in message
Well I tried your suggestion. It seems to be locking up with an error stating
"sub or function not defined" and highlites
Questions
???Any suggestions
Thanks Donna C.


"Jim Cone" wrote:

As long as all of the subs are in standard modules...

Private Sub RUN_Click()
ThisWorkbook.Worksheets.Add
Questions
Me.Hide
Unload Test
OtherSub2
OtherSub3

OtherSub4
OtherSub5

OtherSub6
OtherSub7

OtherSub8
End Sub
--
Jim Cone
San Francisco, USA
http://www.realezsites.com/bus/primitivesoftware



"Donna C"
wrote in message
I had one rather large sub that worked great, I broke down into 8 seperate
subs to simplify code changes later on.I have a user form with a run button.
Originally it ran the one sub and worked great.Now with it split into many
how do I go from one sub straight into the next one until all are run??? This
is what the code looks like with just one of the subs listed.
Thanks in advance,
Donna C.

Private Sub RUN_Click()
ThisWorkbook.Worksheets.Add
Questions
Me.Hide
Unload Test
End Sub

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
calling subs Bob Phillips Excel Programming 0 December 18th 06 03:51 PM
Scope of Subs? Ken Loomis Excel Programming 9 August 6th 05 07:36 PM
ending subs [email protected] Excel Programming 2 May 17th 05 06:13 PM
Private subs Flima Excel Programming 1 January 7th 05 10:05 PM
calling subs Mike Excel Programming 4 April 8th 04 08:22 PM


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