Created
June 21, 2016 16:11
-
-
Save erajanraja24/834428f2c534fac9c16a4cc4d7ed4ee5 to your computer and use it in GitHub Desktop.
Excel VBA Scope of variables
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Dim var1 As Integer | |
| Sub Module_Scope_1() | |
| var1 = 20 | |
| Debug.Print "Value of var1 in Module_Scope_1: "; var1 | |
| var1 = var1 + 15 | |
| End Sub | |
| Sub Module_Scope_2() | |
| Debug.Print "Value of var1 in Module_Scope_2: "; var1 | |
| End Sub |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment