Symbolleiste löschen?!? Hilfe!
21.11.2005 08:39:22
Markus
habe gerade mal wieder etwas mit VBA herumexperimentiert und dabei ein Symbolleiste wie folgt integriert:
Sub TextSchaltflaecheEinrichten()
CustomizationContext = NormalTemplate
Dim x As CommandBarControl
Set x = CommandBars("Standard").Controls.Add(Type:=msoControlEdit)
With x
.BeginGroup = True
.Style = 1
.Caption = "Zoll -> cm"
.Width = CentimetersToPoints(3.5)
.OnAction = "TextSchaltflaecheExit"
.Text = "1"
End With
End Sub
Sub TextSchaltflaecheExit()
Dim x As CommandBarControl
Set x = CommandBars.ActionControl
If IsNumeric(x.Text) Then x.Text = x.Text * 2.54 Else x.Text = "*Error*"
End Sub
Quelle: http://mypage.bluewin.ch/reprobst/WordFAQ/OnAction.htm#OnAction1101
Das Skript habe ich nun dummerweise schon 5mal ablaufen lassen und jetzt habe ich die Symbolleiste 5 mal in meinem Excel und trotzdem keine Ahnung wie ich sie wieder löschen kann. Mit "CommandBars("Standard").Controls.Delete" funktioniert es leider nicht. Wer kann mir weiterhelfen?
Danke im voraus und viele Grüße
Markus