Private Sub Command1_Click()
Dim rSel As Long
With MSFlexGrid1
If .Rows = 0 Or .RowSel = 0 Then Exit Sub
rSel = .RowSel
If rSel <> .Rows - 1 Then
For i = rSel + 1 To .Rows - 1
For j = 1 To .Cols - 1
.TextMatrix(i - 1, j) = .TextMatrix(i, j)
Next
Next
End If
.Rows = .Rows - 1
End With
End Sub