Automating through sub activities

jlister

Board Regular
Joined
Nov 16, 2004
Messages
64
I currently have a series of VBA scrips relative to one spreadsheet and in order for each aspect to work, I need to go to each individual "sub" and press F5.
Is there any way to automate this so that the system walks through each activity is sequence?
Thanks in advance
 

Excel Facts

Can Excel fill bagel flavors?
You can teach Excel a new custom list. Type the list in cells, File, Options, Advanced, Edit Custom Lists, Import, OK
You can run a Sub or multiple Sub from another Sub, like this:
VBA Code:
Sub try()
 try1
 try2
End Sub

Sub try1()
Debug.Print "A"
End Sub

Sub try2()
Debug.Print "B"
End Sub
if you run Sub try, it will run sub try1 & try2.
 
Upvote 0
You can run a Sub or multiple Sub from another Sub, like this:
VBA Code:
Sub try()
 try1
 try2
End Sub

Sub try1()
Debug.Print "A"
End Sub

Sub try2()
Debug.Print "B"
End Sub
if you run Sub try, it will run sub try1 & try2.
Thanks. Where do I put these in relation to my current script?
 
Upvote 0
Create a new sub in the same module as your current script. And just write in it your subs name that you want to run sequentially.
 
Upvote 0
Create a new sub in the same module as your current script. And just write in it your subs name that you want to run sequentially.
Tried that.
Sub try()
try1
try2
try3
try4
try5
End Sub

and renamed my Subs - Sub1, Sub2 etc to Sub 5

get an error message "Sub or Function not defined"
Any ideas?
 
Upvote 0

Forum statistics

Threads
1,221,677
Messages
6,161,232
Members
451,692
Latest member
jmaskin

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top