Private Sub CommandButton1_Click()
Dim sh As Worksheet, lastRow As Long, k As Long, m As Long, r As Long
With ThisWorkbook.Sheets("name_list")
lastRow = .Cells(.Rows.Count, 1).End(xlUp).Row
For k = 2 To lastRow
For Each sh In Worksheets
If sh.Name = .Cells(k, 1).Value Then
If ActiveCell.Rows.Count = 1 Then
With ThisWorkbook.Worksheets(CStr(.Cells(k, 1).Value))
m = .Cells(.Rows.Count, 1).End(xlUp).Row
For r = 2 To m
If .Cells(r, 1) = Cells(ActiveCell.Row, 1).Value And .Cells(r, 2) = Cells(ActiveCell.Row, 2).Value And .Cells(r, 3) = Cells(ActiveCell.Row, 3).Value Then
.Cells(r, 1).Resize(1, 3).Delete
End If
Next r
End With
End If
End If
Next sh
Next k
End With
End Sub