I am maintaining a VB6 program that does not use Option Explicit
. I know this is not a good idea but I did not write the code.
An example of my problem is that one variable called state
has been used in a procedure without Dim
.
A DLL
has since been introduced as a reference in the project. Now the compiler thinks that state
is referring to a global variable in the DLL
. Now a line in the code causes a type mismatch error.
How can I avoid this problem?
Ref: http://msdn.microsoft.com/en-us/library/aa241733(v=vs.60).aspx