![]() |
|
#6
|
|||
|
|||
|
The reason for declaring them is a separate module is just hygiene. They are not specific to any other module (that's why they're public), and keeping them together lets you find them all at a glance. For someone trying to understand your code, it's a good place to start reading.
Public variables have their place, but should be used only after careful consideration of the alternatives. In general, they can make code harder to debug and maintain. The only code I might include in that module is a routine that initializes those variables. |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Run Time Error '91': Object variable or With block variable not set using Catalogue Mailmerge | Berryblue | Mail Merge | 1 | 11-13-2014 05:36 PM |
Modelling training modules
|
Vincent | Project | 3 | 09-03-2014 05:37 PM |
Run-time error 91 object variable or with block variable not set
|
JUST ME | Word VBA | 4 | 03-25-2014 06:56 AM |
Empty Modules
|
Greg S. | Excel Programming | 2 | 07-30-2013 01:38 PM |
Run-time error '91': Object variable or With block variable not set
|
tinfanide | Excel Programming | 2 | 06-10-2012 10:17 AM |