Code:
Private Sub cmdApply4_Click()
Dim i As Integer, j As Integer, fgRowRemove%
For i = Form13.MSFlexGrid1.Rows To 1 Step -1
   If Form13.MSFlexGrid1.TextMatrix(i, 8) <> Form12.Com_window.Text Then
           Form13.MSFlexGrid1.RemoveItem ( i ) 
  End If
Next i

End Sub
JG