Hello all.

I need your help with a code.

I would like to remove rows in my MSFlexgrid: If Form13.MSFlexGrid1.TextMatrix(i, 7) <> Form12.Com_window.Text Then

I only want to remove rows that match the criteria from the Form12.Com_window.Text.

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
           fgRemoveRow Form13.MSFlexGrid1, i
   End If
Next i

End Sub
With this code, i have an error:Sub or function not define.

How can i fix that please?

Thanks for your help