-
A Reminder Re: Module-Level Variables
Hey everyone. I just spent an hour troubleshooting an error, until I finally found something I hadn't expected: a local variable was masking a module-level variable. Just in case it helps anyone, I thought I'd share this reminder: if you have a module variable named X, and you declare a local variable named X, any actions in that method will use the local variable. Unlike a real IDE, the VBA tool will give you no warning.
It's almost enough to make me start using m_ prefixes... but not quite. Too ugly 
- Jon of All Trades
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules