I'm having this same issue. I'm trying to create a button that when clicked will remove certain rows on a sheet and move them to another (archive) sheet. Here's the code. Any hep would be greatly appreciated:
Private Sub CommandButton1_Click()
a = Worksheets("repairboard").Cells(Rows.Count, 1).End(xlUp).Row
For i = 4 To a
If Worksheets("repairboard").Cells(i, 11).Value = "x" Then
Worksheets("repairboard").Rows(i).Cut
Worksheets("archive").Activate
b = Worksheets("archive").Cells(Rows.Count, 1).End(xlUp).Row
Worksheets("archive").Cells(b + 1, 1).Select
ActiveSheet.Paste
Worksheets("repairboard").Activate
End If
lastrow = ThisWorkbook.Worksheets("repairboard").Cells(Rows.Count, 1).End(x1UP).Row
For j = lastrow To 4 Step by - 1
If Worksheets("repairboard").Cells(j, 11).Value = "x" Then
Rows(j).Delete
End If
Next
Application.CutCopyMode = False
ThisWorkbook.Worksheets("repairboard").Cells(1, 1).Select
End Sub