Live-Forum - Die aktuellen Beiträge
Datum
Titel
28.03.2024 21:12:36
28.03.2024 18:31:49
Anzeige
Archiv - Navigation
880to884
Aktuelles Verzeichnis
Verzeichnis Index
Übersicht Verzeichnisse
Vorheriger Thread
Rückwärts Blättern
Nächster Thread
Vorwärts blättern
Anzeige
HERBERS
Excel-Forum (Archiv)
20+ Jahre Excel-Kompetenz: Von Anwendern, für Anwender
880to884
880to884
Aktuelles Verzeichnis
Verzeichnis Index
Verzeichnis Index
Übersicht Verzeichnisse
Inhaltsverzeichnis

unterpunkt

unterpunkt
25.06.2007 11:29:13
SteffenS
Hallo zusammen,
ich habe mir eine eigene Menüleiste gebaut in der auch PopupMenüs vorhanden sind.
Das Menü erzeuge ich einmal beim laden.
Wie kann ich meine Untermenü um neue Punkte erweitern. Ich möchte also auf ein bestimmtes Untermenü zugreifen.
Möchte dies über ein separates Makro machen
Hier mein code zum Menü:
Public cmbMain As CommandBar
Public cmfPopup_asw As CommandBarPopup 'oberstes Popup
With cmbMain.Controls(cmfPopup_asw.Caption).Controls
Set cmfPopup1 = .Add(Type:=LANGUF.Cells(i, 9).Value, Temporary:=True)
'Sprache abfragen
If ADM.Range("E324").Value = 1 Or ADM.Range("E324").Value = "" Then
'Deutsch einsetzen
cmfPopup1.Caption = LANGUF.Cells(i, 13).Value 'Beschreibung
Else
'Englisch einsetzen
cmfPopup1.Caption = LANGUF.Cells(i, 14).Value 'Beschreibung
End If
cmfPopup1.Style = LANGUF.Cells(i, 10).Value 'Style
cmfPopup1.FaceId = LANGUF.Cells(i, 7).Value 'Symbol
cmfPopup1.OnAction = LANGUF.Cells(i, 8).Value 'Makro
End With
Danke im Voraus
MFG
Steffen Schmerler

3
Beiträge zum Forumthread
Beiträge zu diesem Forumthread

Betreff
Datum
Anwender
Anzeige
AW: unterpunkt
25.06.2007 11:41:47
Claus
Hallo Steffen,
ich habe das bei mir so gelöst:
Beim Starten der Datei lösche ich vorsichtshalber die Menüleiste:
For Each ToolsBar In CommandBars
If ToolsBar.Name = "ToolsBar" Then ToolsBar.Delete
Next
Dann lege ich sie neu an:
Set ToolsBar = Application.CommandBars.Add("ToolsBar", Position:=msoBarLeft)
Set ToolsBar1 = ToolsBar.Controls.Add(Type:=msoControlPopup)
ToolsBar1.Caption = "Tools"
ToolsBar1.Tag = "Tools"
ToolsBar.Visible = True
Hier kommen die einzelnen Menüpunkte:
Set DE_Format = ToolsBar1.Controls.Add(Type:=msoControlButton)
With DE_Format
.Caption = "DataEditor Import Formatierung"
.OnAction = "Import_aus_DataEditor"
.Style = msoButtonCaption
End With
Set Spaltenbreite = ToolsBar1.Controls.Add(Type:=msoControlButton)
With Spaltenbreite
.Caption = "Spaltenbreite und Freeze"
.OnAction = "Spalte_und_Freeze"
.Style = msoButtonCaption
End With
Set InsertSheet = ToolsBar1.Controls.Add(Type:=msoControlButton)
With InsertSheet
.Caption = "Insert Sheet"
.OnAction = "Insert_Sheet"
.Style = msoButtonCaption
End With
Set DerivedSegm = ToolsBar1.Controls.Add(Type:=msoControlPopup)
With DerivedSegm
.Caption = "Derived Segmentations"
End With
Und hier ein Unterpunkt eines Menues:
Set DerivedSegm1 = DerivedSegm.Controls.Add(Type:=msoControlButton)
With DerivedSegm1
.Caption = "BVG (aggr. Aktien) zuordnen"
.OnAction = "BVG_aggr_Aktien_zuordnen"
.Style = msoButtonCaption
End With
Vielleicht hilft Dir das bei Deinem Problem...
Gruss
Claus

Anzeige
AW: unterpunkt
25.06.2007 22:15:00
SteffenS
Danke hast mir damit geholfen.
So ein kleiner Denkanstoß hilft manchmal :-))
VG
Steffen

AW: unterpunkt
25.06.2007 22:15:13
SteffenS
Danke hast mir damit geholfen.
So ein kleiner Denkanstoß hilft manchmal :-))
VG
Steffen

Beliebteste Forumthreads (12 Monate)

Anzeige

Beliebteste Forumthreads (12 Monate)

Anzeige
Anzeige
Anzeige