ich möchte gern die Blattauswahl über die Symbolleiste vornehmen.
Die Darstellung mit:
'Dropdown Symbolleiste erzeugen
Dim cmfcontrol As CommandBarComboBox
Set cmfcontrol = Application.CommandBars("Jahresplanung").Controls.Add(Type:=msoControlComboBox)
'Sprache abfragen
If ADM.Range("E324").Value = 1 Or ADM.Range("E324").Value = "" Then
'Deutsch einsetzen
cmfButton.Caption = LANGUF.Range("G536").Value 'Beschreibung
Else
'Englisch einsetzen
cmfButton.Caption = LANGUF.Range("H536").Value 'Beschreibung
End If
For i = 1 To Sheets.Count
'MsgBox (Sheets(i).Name)
If Sheets(i).Visible = xlSheetVisible Then cmfcontrol.AddItem Sheets(i).Name
Next
cmfcontrol.Width = 100
cmfcontrol.DropDownLines = 50
cmfcontrol.DropDownWidth = 200
'cmfcontrol.ListIndex = 10
cmfcontrol.OnAction = "symb_asw_hbv"
cmfcontrol.BeginGroup = True
~f~
Klappt auch einwandfrei.
Wie komme ich aber jetzt an den ausgewählten Wert im Makro: symb_asw_hbv ran
Mit:
~f~
With Application.CommandBars("Jahresplanung").Controls(2).ListIndex
.Visible = True
.Select
End With
Geht es irgendwie net
Danke für Eure Hilfe
MFG
Steffen