VB6 Type Mismatch Error

I get the following type mismatch error for the following

   IF obj.propery THEN
    ...
    END IF

the code I use is safe for the visual source, and when other developers run the same project, the code works without errors. A property is actually the string that the problem may be. When I debug and check the ie property

?obj.propery = True

Errors do not occur, which is a bit strange. If I put the cursor over the property, it will say “True”. I worked a bit on this issue and found that this may have something to do with OPTION STRICT, however, I have the same version of the code as other developers, and OPTION STRICT is not turned off, it has not been changed in the code at all. Are there other settings that may affect the execution of the code at runtime?

+3
4

, , . , - DLL, . , VB DLL " " , -, . , , .

+3

VB6, XP , XPMUser. XPMUser, , , . , .

+2

So, are you sure that this is not the case of the logical existence of Vrai ?

+1
source

I would tend to be more explicit in your IF state

IF isempty(obj.property) = false AND isnull(obj.property) = false

BUT

it would be prudent to verify that obj is not null first before you start accessing its properties ....

0
source

Source: https://habr.com/ru/post/1786869/


All Articles