Use Call to invoke another sub module : Call « Language Basics « VBA / Excel / Access / Word

Home
VBA / Excel / Access / Word
1.Access
2.Application
3.Data Type
4.Data Type Functions
5.Date Functions
6.Excel
7.File Path
8.Forms
9.Language Basics
10.Math Functions
11.Outlook
12.PowerPoint
13.String Functions
14.Windows API
15.Word
16.XML
Microsoft Office PowerPoint 2007 Tutorial
Microsoft Office Excel 2007 Tutorial
Microsoft Office Word 2007 Tutorial
VBA / Excel / Access / Word » Language Basics » Call 
Use Call to invoke another sub module
 
Sub Func1()
   Dim intTemp As Integer
   intTemp = 10
   Debug.Print "We Are Now In Func1()"
   Debug.Print intTemp
   Call Func2
End Sub

Sub Func2()
   Dim strName As String
   strName = "Bill Gates"
   Debug.Print "We Are Now In Func2()"
   Debug.Print strName
   Call Func3
End Sub

Sub Func3()
   Debug.Print "We Are Now In Func3()"
   msgBox "Hi There From The Func3() Sub Procedure"
End Sub

 
Related examples in the same category
1.Using Procedures and Subprocedures
2.Using Parameter Arrays
java2s.com  |  | Contact Us | Privacy Policy
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.