I am getting the following type mismatch error on the following
IF obj.propery THEN
...
END IF
the code I am using is on visual source safe and when other developers run the same project the code runs with no error. The property is actually a string which is where the problem could be. When I debug and test the property i.e.
?obj.propery = True
no errors are thrown which is a bit strange. If I place the cursor over the property it says "True". I have done a bit of searching on the matter and have found that this may have something to do with OPTION STRICT, however I have the same version of the code as the other developers and OPTION STRICT is not OFF, it hasn't been altered in the code at all. Are there any other settings that could affect this execution of code at run time?
Option Strict
in VB 6. The searching you've done has probably turned up VB.NET-related resources. It's not, erm, possible that the other developers are using VB.NET, is it? – Cody GrayString
with the values "true"/"True" or "false"/"False" to aBoolean
when testing the value with an if statement. As distressing as that is to me, it appears to be reality. You'll of course still get a compiler error if the string is set to something other than those two values. Can you try creating a brand new project in your copy of VB 6 and seeing if it does the same thing extracted from the larger code base? – Cody Gray