When I have a variable declared globally, I can re-use the same variable-name at function-level, without the compiler complaining about it.
Is there some way to disable this (similar to Option Explicit)?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
No there is not.
The operation is perfectly valid and you can still access both by fully qualifying the reference, but by default it will try and access the closest in scope.