I have an issue with my code. Not that it give me an error but the result wanted is not there.
I need to ask, for every row of grid 1 to find the value in column 5 in the grid2 in column10.
if it exist, it clear the column 14 from grid one of the same row as the result.
If it does not exist, then it put: MSHFlexGrid1.TextMatrix(r1, 14) = "NEEDS TO BE REMOVED"
Dim r1 As Long, r2 As Long, i As Long
Dim test1 As String
For r1 = 1 To MSHFlexGrid1.Rows - 1
test1 = MSHFlexGrid1.TextMatrix(r1, 5)
For r2 = 1 To MSHFlexGrid2.Rows - 1
If MSHFlexGrid2.TextMatrix(r2, 10) = test1 Then
MSHFlexGrid1.TextMatrix(r1, 14) = ""
MSHFlexGrid1.TextMatrix(r1, 14) = "NEEDS TO BE REMOVED"
MSHFlexGrid1.Row = r1
MSHFlexGrid1.Col = 14
MSHFlexGrid1.CellBackColor = &H80FF&
Now, it always put "NEEDS TO BE REMOVED" even if the result exist.
Thanks for your help