Good, so I'm not very familiar with VB6, but I'm trying to figure out if the array contains a value. This is what I have, but it causes an error for me. Maybe the “passing shaft” problem is the wrong type, but I don't think so.
Dim transCodes As Variant
transCodes = Array(40, 41, 42, 43)
If (transCodes.Contains("passedValue")) Then
*Do Stuff*
End If
Any help would be really appreciated!
UPDATE
My syntax failed to fix, could you give me an example for cast / convert, which I could use to provide the correct type of "receivedValue"?
UPDATE MY UPDATES
So, there is no “Contains” method in VB6? Any other ways to accomplish this simple task?
source
share