1.11M Members

Search text in MSHFlexGrid


Hi boards,

I managed to read text file into MSHFlexgrid.
Now i want to search a word in textbox and higlight it in flexgrid.
Anyone know how to do this?

Thank you


This should working :

Private Sub Command1_Click()
xSearch = Text1.Text
For i = 0 To Grid.Rows - 1
    If xSearch = Grid.TextMatrix(i, 1) Then
        Grid.Row = Grid.TextMatrix(i, 1)
        For j = 1 To Grid.Cols - 1
            Grid.Col = j
            Grid.CellBackColor = vbCyan
        Next j
    End If
Next i
End Sub

Thank You sir.
It works.

Question Answered as of 1 Year Ago by Jx_Man
This question has already been solved: Start a new discussion instead
Start New Discussion
View similar articles that have also been tagged: