Hi Ataraxicatom,
try this as an alternative, which looks at the row of each commandbutton and matches with the cell.
Sub BeginRemoval(remitem() As String)
Dim e, rngFind As Range, C As OLEObject
With Sheets("A-M")
For Each e In remitem()
If e <> "" Then
Set rngFind = .Columns(1).Find(e, , xlValues, xlWhole)
If Not rngFind Is Nothing Then
For Each C In .OLEObjects
If TypeName(C.Object) = "CommandButton" Then
'this is what you are looking for, matching commandbutton row with the cell
If C.TopLeftCell.Row = rngFind.Row Then C.Delete
End If
Next C
rngFind.EntireRow.Delete 'or from your code, .Rows(2).delete
Set rngFind = Nothing
End If
End If
Next e
End With
End Sub
Regards,
berlan
Bookmarks