ich versuch in einer neuen leiste ein untermenü zu erzeugen.
aber es klappt nicht wo liegt der Fehler?
gruss
peter
gruss
peter
Sub MenüErstellen()
Code eingefügt mit Syntaxhighlighter 1.14
Dim AktiveMenüLeiste As Object, Kvasy As Object, Befehl As Object, MB As Object
Dim MeinMenü
On Error Resume Next
Application.CommandBars("Meinmenü").Delete
CommandBars.ActiveMenuBar.Controls("t").Delete
Set AktiveMenüLeiste = CommandBars.ActiveMenuBar
Set MeinMenü = AktiveMenüLeiste.Controls.Add(Type:=msoControlPopup, Temporary:=True)
MeinMenü.Caption = "&Kvasy_Daten"
Set Befehl = MeinMenü.Controls.Add(Type:=msoControlPopup)
With Befehl
.Caption = "Makieren Zelle"
.BeginGroup = True 'fügt eine Trennlinie ein
End With
With MeinMenü.Controls(1)
With .Controls.Add(msoControlButton)
.Caption = "E-Mail"
.OnAction = "Post"
.FaceId = 24
End With
With .Controls.Add(msoControlButton)
.Caption = "Zur Homepage"
.OnAction = "Homepage"
.FaceId = 610
End With
End With
Set Befehl = MeinMenü.Controls.Add(Type:=msoControlButton, ID:=1)
With Befehl
.Caption = "&Statistik über Bestellungen"
.OnAction = "WE2000Statistik"
End With
End Sub
Gruß
Nepumuk
Sub MenüErstellen()
Code eingefügt mit Syntaxhighlighter 1.14
Dim AktiveMenüLeiste As Object, Kvasy As Object, Befehl As Object, MB As Object
Dim MeinMenü
On Error Resume Next
Application.CommandBars("Meinmenü").Delete
CommandBars.ActiveMenuBar.Controls("t").Delete
Set AktiveMenüLeiste = CommandBars.ActiveMenuBar
Set MeinMenü = AktiveMenüLeiste.Controls.Add(Type:=msoControlPopup, Temporary:=True)
MeinMenü.Caption = "&Kvasy_Daten"
Set Befehl = MeinMenü.Controls.Add(Type:=msoControlPopup)
With Befehl
.Caption = "Makieren Zelle"
.BeginGroup = True 'fügt eine Trennlinie ein
End With
With MeinMenü.Controls(1)
With .Controls.Add(msoControlButton)
.Caption = "E-Mail"
.OnAction = "Post"
.FaceId = 24
End With
With .Controls.Add(msoControlButton)
.Caption = "Zur Homepage"
.OnAction = "Homepage"
.FaceId = 610
End With
End With
Set Befehl = MeinMenü.Controls.Add(Type:=msoControlButton, ID:=1)
With Befehl
.Caption = "&Statistik über Bestellungen"
.OnAction = "WE2000Statistik"
End With
End Sub
Gruß
Nepumuk
Sub MenüErstellen()
Code eingefügt mit Syntaxhighlighter 1.14
Dim AktiveMenüLeiste As Object, Kvasy As Object, Befehl As Object, MB As Object
Dim MeinMenü
On Error Resume Next
Application.CommandBars("Meinmenü").Delete
CommandBars.ActiveMenuBar.Controls("t").Delete
Set AktiveMenüLeiste = CommandBars.ActiveMenuBar
Set MeinMenü = AktiveMenüLeiste.Controls.Add(Type:=msoControlPopup, Temporary:=True)
MeinMenü.Caption = "&Kvasy_Daten"
Set Befehl = MeinMenü.Controls.Add(Type:=msoControlPopup)
With Befehl
.Caption = "Makieren Zelle"
.BeginGroup = True 'fügt eine Trennlinie ein
End With
With MeinMenü.Controls(1)
With .Controls.Add(msoControlButton)
.Caption = "E-Mail"
.OnAction = "Post"
.FaceId = 24
End With
With .Controls.Add(msoControlButton)
.Caption = "Zur Homepage"
.OnAction = "Homepage"
.FaceId = 610
End With
End With
Set Befehl = MeinMenü.Controls.Add(Type:=msoControlButton, ID:=1)
With Befehl
.Caption = "&Statistik über Bestellungen"
.OnAction = "WE2000Statistik"
End With
End Sub
Gruß
Nepumuk
Sub MenüErstellen()
Code eingefügt mit Syntaxhighlighter 1.14
Dim AktiveMenüLeiste As Object, Kvasy As Object, Befehl As Object, MB As Object
Dim MeinMenü
On Error Resume Next
Application.CommandBars("Meinmenü").Delete
CommandBars.ActiveMenuBar.Controls("t").Delete
Set AktiveMenüLeiste = CommandBars.ActiveMenuBar
Set MeinMenü = AktiveMenüLeiste.Controls.Add(Type:=msoControlPopup, Temporary:=True)
MeinMenü.Caption = "&Kvasy_Daten"
Set Befehl = MeinMenü.Controls.Add(Type:=msoControlPopup)
With Befehl
.Caption = "Makieren Zelle"
.BeginGroup = True 'fügt eine Trennlinie ein
End With
With MeinMenü.Controls(1)
With .Controls.Add(msoControlButton)
.Caption = "E-Mail"
.OnAction = "Post"
.FaceId = 24
End With
With .Controls.Add(msoControlButton)
.Caption = "Zur Homepage"
.OnAction = "Homepage"
.FaceId = 610
End With
End With
Set Befehl = MeinMenü.Controls.Add(Type:=msoControlButton, ID:=1)
With Befehl
.Caption = "&Statistik über Bestellungen"
.OnAction = "WE2000Statistik"
End With
End Sub
Gruß
Nepumuk
Sub MenüErstellen()
Code eingefügt mit Syntaxhighlighter 1.14
Dim AktiveMenüLeiste As Object, Kvasy As Object, Befehl As Object, MB As Object
Dim MeinMenü
On Error Resume Next
Application.CommandBars("Meinmenü").Delete
CommandBars.ActiveMenuBar.Controls("t").Delete
Set AktiveMenüLeiste = CommandBars.ActiveMenuBar
Set MeinMenü = AktiveMenüLeiste.Controls.Add(Type:=msoControlPopup, Temporary:=True)
MeinMenü.Caption = "&Kvasy_Daten"
Set Befehl = MeinMenü.Controls.Add(Type:=msoControlPopup)
With Befehl
.Caption = "Makieren Zelle"
.BeginGroup = True 'fügt eine Trennlinie ein
End With
With MeinMenü.Controls(1)
With .Controls.Add(msoControlButton)
.Caption = "E-Mail"
.OnAction = "Post"
.FaceId = 24
End With
With .Controls.Add(msoControlButton)
.Caption = "Zur Homepage"
.OnAction = "Homepage"
.FaceId = 610
End With
End With
Set Befehl = MeinMenü.Controls.Add(Type:=msoControlButton, ID:=1)
With Befehl
.Caption = "&Statistik über Bestellungen"
.OnAction = "WE2000Statistik"
End With
End Sub
Gruß
Nepumuk
Sub MenüErstellen()
Code eingefügt mit Syntaxhighlighter 1.14
Dim AktiveMenüLeiste As Object, Kvasy As Object, Befehl As Object, MB As Object
Dim MeinMenü
On Error Resume Next
Application.CommandBars("Meinmenü").Delete
CommandBars.ActiveMenuBar.Controls("t").Delete
Set AktiveMenüLeiste = CommandBars.ActiveMenuBar
Set MeinMenü = AktiveMenüLeiste.Controls.Add(Type:=msoControlPopup, Temporary:=True)
MeinMenü.Caption = "&Kvasy_Daten"
Set Befehl = MeinMenü.Controls.Add(Type:=msoControlPopup)
With Befehl
.Caption = "Makieren Zelle"
.BeginGroup = True 'fügt eine Trennlinie ein
End With
With MeinMenü.Controls(1)
With .Controls.Add(msoControlButton)
.Caption = "E-Mail"
.OnAction = "Post"
.FaceId = 24
End With
With .Controls.Add(msoControlButton)
.Caption = "Zur Homepage"
.OnAction = "Homepage"
.FaceId = 610
End With
End With
Set Befehl = MeinMenü.Controls.Add(Type:=msoControlButton, ID:=1)
With Befehl
.Caption = "&Statistik über Bestellungen"
.OnAction = "WE2000Statistik"
End With
End Sub
Gruß
Nepumuk
Sub MenüErstellen()
Dim AktiveMenüLeiste As Object, Kvasy As Object, Befehl As Object, MB As Object
Dim MeinMenü
On Error Resume Next
Application.CommandBars("Meinmenü").Delete
CommandBars.ActiveMenuBar.Controls("t").Delete
Set AktiveMenüLeiste = CommandBars.ActiveMenuBar
Set MeinMenü = AktiveMenüLeiste.Controls.Add(Type:=msoControlPopup, Temporary:=True)
MeinMenü.Caption = "&Kvasy_Daten"
Set Befehl = MeinMenü.Controls.Add(Type:=msoControlPopup)
With Befehl
.Caption = "Makieren Zelle"
.BeginGroup = True 'fügt eine Trennlinie ein
End With
With MeinMenü.Controls(1)
With .Controls.Add(msoControlButton)
.Caption = "E-Mail"
.OnAction = "Post"
.FaceId = 24
End With
With .Controls.Add(msoControlButton)
.Caption = "Zur Homepage"
.OnAction = "Homepage"
.FaceId = 610
End With
End With
Set Befehl = MeinMenü.Controls.Add(Type:=msoControlButton, ID:=1)
With Befehl
.Caption = "&Statistik über Bestellungen"
.OnAction = "WE2000Statistik"
End With
End Sub
Gruß
Nepumuk