Symbol-Schaltflächentext per VBA ändern
30.08.2007 07:49:22
Kasimir
ich benötige mal Eure Hilfe. Mit dem nachfolgenden Makro erstelle ich eine neue Symbolleiste.
Public Const Symbolleistenname = "Symbolleiste Bundesliga"
Sub Symbolleiste()
Dim MySymbolleiste As CommandBar
Dim objControl_893 As CommandBarButton
Dim objControl_855 As CommandBarButton
Dim objControl_928 As CommandBarButton
Application.ScreenUpdating = False
On Error Resume Next
Application.CommandBars(Symbolleistenname).Delete
Set MySymbolleiste = Application.CommandBars.Add( _
Symbolleistenname, msoBarTop, False, True)
'Blattschutz
Set objControl_893 = MySymbolleiste.Controls.Add(Type:= _
msoControlButton, ID:=893, Before:=1)
With objControl_893
.BeginGroup = True
End With
'Zellen formatieren
Set objControl_855 = MySymbolleiste.Controls.Add(Type:= _
msoControlButton, ID:=855, Before:=2)
With objControl_855
.BeginGroup = True
End With
'Sortieren
Set objControl_928 = MySymbolleiste.Controls.Add(Type:= _
msoControlButton, ID:=928, Before:=3)
With objControl_928
.BeginGroup = True
End With
MySymbolleiste.Visible = True
End Sub
Nun möchte ich aber nicht nur die Symbole, sondern auch den dazugehörigen Schaltflächentext angezeigt bekommen. Wie muss ich den VBA-Code ändern, damit mir auch der Schaltflächentext angezeigt wird.
Danke Euch für Eure Hilfe.
Gruß,
Kasimir