Private Sub CommandButton1_Click()
Dim myRow , d, i As Integer
Sheets("final").Activate
With Sheets("final")
myRow = .Cells(1, 1).CurrentRegion.Rows.Count
d = 1 For i = 1 To myRow
If Range("V" & d).Value = ComboBox1.Value Then
Rows(d).Delete Shift:=xlUp
Else
d = d + 1
End If
Next i
Private Sub CommandButton1_Click()
Dim myRow As Integer, d, i As Integer
'Sheets("final").Activate ' 不要這一行
With Sheets("final")
myRow = .Cells(1, 1).CurrentRegion.Rows.Count
d = 1
For i = 1 To myRow
If .Range("V" & d).Value = ComboBox1.Value Then '加一點
.Rows(d).Delete Shift:=xlUp '加一點
Else
d = d + 1
End If
Next i