Public Function LocalizarNoFlexGrid(FlexGrid As MSFlexGrid, TextoBox As TextBox, MyCol As Integer)
Dim MyRow As Integer
Screen.MousePointer = vbHourglass
With FlexGrid
.FillStyle = flexFillRepeat
For MyRow = 1 To .Rows - 1
.Row = MyRow
Select Case .TextMatrix(.Row, MyCol)
Case TextoBox.Text
.TopRow = .Row
MyRow = .Rows
.Col = 1
.ColSel = .Cols - 1
End Select
Next
.FillStyle = flexFillRepeat
End With
Screen.MousePointer = vbDefault
End Function
Private Sub CmdSearch_Click()
LocalizarNoFlexGrid GRADE, TxtSearch, 4
End Sub
Private Sub Form_Load()
GRADE.FocusRect = 0
'DEIXA O FOCUS NULO
GRADE.SelectionMode = flexSelectionByRow
'SELECIONA LINHA
End Sub