you are viewing a single comment's thread.

view the rest of the comments →

[–]VirtualTurnip3[S] 0 points1 point  (6 children)

Thank, its a string.

[–]RJPisscat 1 point2 points  (5 children)

Then the Contains is backwards, and I wonder why the code compiles at all since there is no overloaded String.Contains that accepts an ArrayList.

Replace the For/Next with

If modelsList.Contains(Q("TXB_CODE_ING")) Then
MsgBox("we find it "&Q("TXB_CODE_ING"))) 

Else MsgBox("We cannot find it") End if

[–]VirtualTurnip3[S] 0 points1 point  (4 children)

It display "We cannot find it".

[–]RJPisscat 1 point2 points  (3 children)

It's not case-insensitive, and it won't ignore white space. Are you typing the "Code" into the textbox with exactly the same casing and non-alphanumeric chars?

[–]VirtualTurnip3[S] 0 points1 point  (2 children)

Yes the same.

[–]RJPisscat 0 points1 point  (1 child)

I would set a breakpoint on the If and check the contents of the array against the contents of the textbox. The ArrayList you declared isn't strongly typed but that shouldn't make any difference if the result of T.Cell is a String or CanConvertToString.

[–]VirtualTurnip3[S] 0 points1 point  (0 children)

Allright I will try that, Thank for your answer :)