wie kann ich alle CommandButton, die in einer Excel-Tabelle sind, auf einmal löschen?
for each button in ???
button.delete
next
Oder gaanz anders?
Danke im Vorraus
Frank
wie kann ich alle CommandButton, die in einer Excel-Tabelle sind, auf einmal löschen?
for each button in ???
button.delete
next
Oder gaanz anders?
Danke im Vorraus
Frank
Versuch's mal etwa so ...
Option Explicit
Const CHECKBOX = "Forms.CheckBox.1"
Const COMBOBOX = "Forms.ComboBox.1"
Const COMMANDBUTTON = "Forms.CommandButton.1"
Const IMAGE = "Forms.Image.1"
Const LABEL = "Forms.Label.1"
Const LISTBOX = "Forms.ListBox.1"
Const OPTIONBUTTON = "Forms.OptionButton.1"
Const SCROLLBAR = "Forms.ScrollBar.1"
Const SPINBUTTON = "Forms.SpinButton.1"
Const TEXTBOX = "Forms.TextBox.1"
Const TOGGLEBUTTON = "Forms.ToggleButton.1"
Sub CBDelete()
Dim i As Object
For Each i In Worksheets("Tabelle1").OLEObjects
If i.ProgId = COMMANDBUTTON Then
i.Delete
End If
Next i
End Sub
Mehr Infos hierzu auf meiner Webseite.
Gruß
Thomas
Risi Thomas Softwareentwicklung
Danke Thomas!
Die erweiterte Suchfunktion hilft dir, gezielt die besten Antworten zu finden
Suche nach den besten AntwortenEntdecke unsere meistgeklickten Beiträge in der Google Suche
Top 100 Threads jetzt ansehen