Code bitte anschauen, hab eine Frage dazu
18.03.2005 00:54:21
Bryan
mit folgendem Code erstelle ich meine eigene Menueleiste. Nun möchte ich ans Ende der leiste noch einen popup Button (Drucken)mit 12 poups (Jan . DEz)erstellen.Aber irgendwie krieg ich das nicht gebacken. Hab ich was vergessen?
Sub Symbolleiste_erstellen()
On Error Resume Next
Dim CB As CommandBar
Dim CBC As CommandBarButton
Set CB = Application.CommandBars(Symbolleistenname)
Symbolleiste_entfernen
Set CB = Application.CommandBars.Add(Name:=Symbolleistenname, _
Temporary:=False, Position:=msoBarTop)
Set CBC = CB.Controls.Add(Type:=msoControlButton)
With CBC
.Caption = " !!! Speichern für uns !!!"
.OnAction = "füruns_Speichern"
.Style = msoButtonCaption
.BeginGroup = True
End With
Set CBC = CB.Controls.Add(Type:=msoControlButton)
With CBC
.Caption = "Speichern für Hr. Huber"
.OnAction = "Huber_Speichern"
.Style = msoButtonCaption
.BeginGroup = True
End With
Set CBC = CB.Controls.Add(Type:=msoControlButton)
With CBC
.Caption = "Kalender erstellen"
.OnAction = "Erstellen"
.Style = msoButtonCaption
.BeginGroup = True
End With
Set CBC = CB.Controls.Add(Type:=msoControlButton)
With CBC
.Caption = "Hilfe"
.OnAction = "Zur_Hilfe"
.Style = msoButtonCaption
.BeginGroup = True
End With
'Set CBC = CB.Controls.Add(Type:=msoControlPopupmsoControlPopup, Temporary:=True)
' With CBC
' .Caption = "Drucken"
' .OnAction = CBC.Controls.Add(Type:=msoControlButton, Id:=1)
' .Style = msoButtonCaption
' .BeginGroup = True
' End With
CB.Visible = True
End Sub
Gruss Bryan