AW: Menüpunkt permanent beim Starten laden
02.09.2003 18:05:47
Willie
Hier hast du ein fertiges Beispiel du mußt z.B. .OnAction = "Eingabe1" deine Makro
name eintagen, welche ausgeführt werden sollen! Bei Caption kannst du eintagen was
dir am besten gefällt das & steht für einen Shortcut z.B. Men&u bedeute Strg + u löst
diesen Menüpunkt aus. Ich hoffe ich habe dir ein bischen weiter geholfen.
Gruß
Willie
P.S. Das zweit Makro ist zum entfernen der Menüleiste!!!
Sub Endkundenformularmenü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