
Private Sub ComboBox1_Enter()
Range("A2").Select
X = Range("A2").Address
Y = Range("A2").End(xlDown).Address
ComboBox1.RowSource = "" & X & ":" & Y & ""
End Sub
Private Sub CommandButton1_Click()
If ComboBox1.Value <> "" Then
Range("A1").Select
Do
ActiveCell.Offset(1).Select
Loop Until ActiveCell.Value = ComboBox1.Value
End If
Selection.EntireRow.Delete
End Sub
|
If UserForm1.ComboBox1.Text <> "" Then
Range("A1").Select
Do
ActiveCell.Offset(1).Select
Loop Until ActiveCell.Value = ComboBox1.Value
Selection.EntireRow.Delete
End If |
