Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

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

Posted on 2006-11-08
1
Medium Priority
?
296 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 1000 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

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Curious about the latest ransomware attack? Check out our timeline of events surrounding the spread of this new virus along with tips on how to mitigate the damage.
Ever wonder what it's like to get hit by ransomware? "Tom" gives you all the dirty details first-hand – and conveys the hard lessons his company learned in the aftermath.
The viewer will learn how to successfully create a multiboot device using the SARDU utility on Windows 7. Start the SARDU utility: Change the image directory to wherever you store your ISOs, this will prevent you from having 2 copies of an ISO wit…
Monitoring a network: why having a policy is the best policy? Michael Kulchisky, MCSE, MCSA, MCP, VTSP, VSP, CCSP outlines the enormous benefits of having a policy-based approach when monitoring medium and large networks. Software utilized in this v…

618 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