Solved

Can I have two sub procedures in one Macro in excel?

Posted on 2006-11-08
1
226 Views
Last Modified: 2008-03-06
And if so, how would I do it?

Thanks
0
Comment
Question by:sarasotamac
1 Comment
 
LVL 35

Accepted Solution

by:
mvidas earned 250 total points
ID: 17898646
sarasotamac,

Yes, well kinda (one macro can only have one sub/end sub), you call other subs from the first.  A quick example:

Sub sarasotamac1()
 MsgBox "This is in the sarasotamac1 Sub"
 sarasotamac2
 Call sarasotamac4 'note that using/not-using call does the same thing
End Sub

Sub sarasotamac2()
 MsgBox "This is in the sarasotamac2 Sub"
 sarasotamac3
End Sub

Sub sarasotamac3()
 MsgBox "This is in the sarasotamac3 Sub"
End Sub

Sub sarasotamac4()
 MsgBox "This is in the sarasotamac4 Sub"
End Sub

Matt
0

Featured Post

What Is Threat Intelligence?

Threat intelligence is often discussed, but rarely understood. Starting with a precise definition, along with clear business goals, is essential.

Join & Write a Comment

Suggested Solutions

Workplace bullying has increased with the use of email and social media. Retain evidence of this with email archiving to protect your employees.
Today, still in the boom of Apple, PC's and products, nearly 50% of the computer users use Windows as graphical operating systems. If you are among those users who love windows, but are grappling to keep the system's hard drive optimized, then you s…
Viewers will learn how to use the Hootsuite Dashboard.
The viewer will learn how to successfully download and install the SARDU utility on Windows 8, without downloading adware.

762 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

23 Experts available now in Live!

Get 1:1 Help Now