AW: Menüleiste
24.10.2003 11:30:18
Willie
Ja das geht hier ein Beispiel
Onaction ruf dann ein Makro auf !
Gruß
Willie
Sub formularmenüeinfuegen()
Dim i As Integer
Dim i_Hilfe As Integer
Dim Endkundenformular As CommandBarControl
Dim Mb As CommandBarControl
i = Application.CommandBars(1).Controls.Count
i_Hilfe = Application.CommandBars(1).Controls(i).index
Set Endkundenformular = Application.CommandBars(1). _
Controls.Add(Type:=msoControlPopup, _
before:=i_Hilfe, Temporary:=True)
Endkundenformular.Caption = "Endkunden&formular"
Set Mb = Endkundenformular.Controls.Add _
(Type:=msoControlButton)
With Mb
.Caption = "&Eingabe Kundendaten"
.Style = msoButtonIconAndCaption
.OnAction = "Eingabe2"
.BeginGroup = True
.FaceId = 23
End With
Set Mb = Endkundenformular.Controls.Add _
(Type:=msoControlButton)
With Mb
.Caption = "&Eingabe Endkundenformular"
.Style = msoButtonIconAndCaption
.OnAction = "Eingabe1"
.BeginGroup = True
.FaceId = 44
End With
Set Mb = Endkundenformular.Controls.Add _
(Type:=msoControlButton)
With Mb
.Caption = "&Auswahl Sprache"
.Style = msoButtonIconAndCaption
.OnAction = "Eingabe0"
.BeginGroup = True
.FaceId = 355
End With
Set Mb = Endkundenformular.Controls.Add _
(Type:=msoControlButton)
With Mb
.Caption = "&Suchen"
.Style = msoButtonIconAndCaption
.OnAction = "suchen"
.BeginGroup = True
.FaceId = 46
End With
End Sub
Sub Endkundenformularmenüausblenden()
Application.CommandBars(1).Reset
End Sub