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

Recommended Answers

All 2 Replies

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
commented: Thanks!!! +0

Thank You sir.
It works.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, learning, and sharing knowledge.