Hi All,

I found the code
Private Sub Command1_Click()
Dim target_name As String
Dim r As Integer
    target_name = InputBox("PODAJ NAZWĘ", "NAZWA", "")
    If Len(target_name) = 1 Then Exit Sub
    target_name = LCase$(target_name)
    For r = 1 To MSHFlexGrid1.Rows - 1
        If LCase$(MSHFlexGrid1.TextMatrix(r, 7)) = target_name Then
            MSHFlexGrid1.Row = r
            MSHFlexGrid1.RowSel = r
            MSHFlexGrid1.Col = 0
            MSHFlexGrid1.ColSel = MSHFlexGrid1.Cols - 1
            MSHFlexGrid1.TopRow = r
            Exit Sub
        End If
    Next r
    End Sub
The code works fine, but the condition introduced in InputBox shows me the first line in MSHFLEXGRID selected search words and I want to see all. Exit Sub I removed, but showed last line, which satisfies the condition. Can you help me?