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






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