stinkingcedar
New Member
- Joined
- May 2, 2016
- Messages
- 23
Hey everyone,
So I just have a general question about variable declaration in vba.
If you declare a variable in a module, can it then be used in other subs/functions in that same module without declaring it again? Can it be used in other modules without declaring it again as well? I use option explicit almost exclusively, not sure if that has anything to do with it, but I was just wondering the scope in which the variables could be used under so I could possibly make my code more compact. Thank you!
So I just have a general question about variable declaration in vba.
If you declare a variable in a module, can it then be used in other subs/functions in that same module without declaring it again? Can it be used in other modules without declaring it again as well? I use option explicit almost exclusively, not sure if that has anything to do with it, but I was just wondering the scope in which the variables could be used under so I could possibly make my code more compact. Thank you!