Solved

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

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

Thanks
0
Comment
Question by:sarasotamac
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

Webinar: Aligning, Automating, Winning

Join Dan Russo, Senior Manager of Operations Intelligence, for an in-depth discussion on how Dealertrack, leading provider of integrated digital solutions for the automotive industry, transformed their DevOps processes to increase collaboration and move with greater velocity.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

In our personal lives, we have well-designed consumer apps to delight us and make even the most complex transactions simple. Many enterprise applications, however, are a bit behind the times. For an enterprise app to be successful in today's tech wo…
All of the resources available today make learning a new digital media easier than ever-- if you know where to begin. This is a clear, simple guide to a few of the basic digital art mediums and how to begin learning them on your own.
Viewers will learn how to use the Hootsuite Dashboard.
With the power of JIRA, there's an unlimited number of ways you can customize it, use it and benefit from it. With that in mind, there's bound to be things that I wasn't able to cover in this course. With this summary we'll look at some places to go…

738 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