Option Explicit
The beauty of this feature is that it can capture typos, because each
variable must be explicitly declared.
Consider this code
For iRowCounter = 1 To 500
If Cells(iRowCounter,"A").Value = "" Then
Cells(iRowCoanter,"B").Value = "X"
End If
Next i
IF you don't have Option Explicit, it will run okay, but not work as the
variable is mis-spelt in the action statement. If you have Option Explicit,
it will not compile, so you will immediately force you to correct it. Could
save hours of debugging.
--
HTH
Bob Phillips
... looking out across Poole Harbour to the Purbecks
(remove nothere from the email address if mailing direct)
"Grace" wrote in message
...
With this new feature, it seems everything must be defined. It just told
me
that "i" in my do loop was undefined. How should I dimension this?
Thanks,
Grace
|