R
RzB
Hmmm... Just had a scary experience...
I accidentally miss-spelled a variable declaration -
a simple Dim of a string.. However, I had just done
a compile and realised that there had been no errors
reported.
I did a little experimentation and found that at least
some other modules did not have this problem. I found
that if I created a statement such as AAA = 99 with no
Dim of AAA and compiled, then the compiler not pick
it up in this one module, but the same statement in other
modules would be detected.
In options the "Require Variable Declaration" is set.
I compacted and repaired - no difference..
So I removed the two lines
Option Compare Database
Option Explicit
at the top of the rogue module, recompiled and the put the
two lines back...
hey presto the compiler finds the undeclared variable....
Does anyone have any idea what is going on? I have googled
but can't find anything similar in the NG history..
What is scary is that I have many, many modules... How do
I know if it's not working in other modules?
Thanks,
Roy
I accidentally miss-spelled a variable declaration -
a simple Dim of a string.. However, I had just done
a compile and realised that there had been no errors
reported.
I did a little experimentation and found that at least
some other modules did not have this problem. I found
that if I created a statement such as AAA = 99 with no
Dim of AAA and compiled, then the compiler not pick
it up in this one module, but the same statement in other
modules would be detected.
In options the "Require Variable Declaration" is set.
I compacted and repaired - no difference..
So I removed the two lines
Option Compare Database
Option Explicit
at the top of the rogue module, recompiled and the put the
two lines back...
hey presto the compiler finds the undeclared variable....
Does anyone have any idea what is going on? I have googled
but can't find anything similar in the NG history..
What is scary is that I have many, many modules... How do
I know if it's not working in other modules?
Thanks,
Roy