ElvisSteel
Board Regular
- Joined
- Mar 23, 2009
- Messages
- 122
Hi,
Several people on this board have recommended that I alway use Option Explicit in my VB code (via the Tools, Options, Require Variable Declaration option)
Firstly, what is the thinking behind this (or what are the implications of not doing this?)
Secondly, When I have a lot of code, I tend to use multiple Modules to group macros together under a common theme. Often I use the same variables in multiple modules, and is there a way of "globally" declaring a variable (perhaps in a single module that contains only these declarations)
These probably seem like dumb questions, but I am quite happy to convert my code to work this way, but I want to ensure that I do this in the most efficient way.
Thanks
Steve
Several people on this board have recommended that I alway use Option Explicit in my VB code (via the Tools, Options, Require Variable Declaration option)
Firstly, what is the thinking behind this (or what are the implications of not doing this?)
Secondly, When I have a lot of code, I tend to use multiple Modules to group macros together under a common theme. Often I use the same variables in multiple modules, and is there a way of "globally" declaring a variable (perhaps in a single module that contains only these declarations)
These probably seem like dumb questions, but I am quite happy to convert my code to work this way, but I want to ensure that I do this in the most efficient way.
Thanks
Steve