Microsoft Excel

Herbers Excel/VBA-Archiv

Informationen und Beispiele zum Thema CommandButton
BildScreenshot zu CommandButton CommandButton-Seite mit Beispielarbeitsmappe aufrufen

Deleting rows

Betrifft: Deleting rows von: Marc
Geschrieben am: 04.11.2014 07:24:34


please see attached file. I would like to chose with the combo box a value in column A. Once I chose it the corresponding row ( where the value is located ) should be deleted.

Thanks for help!



Betrifft: AW: Deleting rows von: MCO
Geschrieben am: 04.11.2014 07:31:52

Good morning!

add this code to the button:

Private Sub CommandButton1_Click()

Set found_cell = Range("A:A").Find(Range("B1"))

End Sub
Please be sure, that the row to be deleted does not contain the data of the Combobox (row 1)

Greetings, MCO


Betrifft: AW: Deleting rows von: Marc
Geschrieben am: 05.11.2014 16:40:25


this is great. Thank you.