Listboxauswahl aus Symbolleiste in Makro übergeben
07.01.2004 15:45:59
Peter
ich möchte den ausgewählten Inhalt aus einer Symbolleistencombobox an das
Makro Probe übergeben.
Wie macht man das?
Danke im voraus
Peter
Set Symbol = Application.CommandBars("Symbolleiste_1").Controls _
.Add(Type:=msoControlComboBox, before:=3)
With Symbol
.AddItem Text:="Anton", index:=1
.AddItem Text:="Bert", index:=2
.AddItem Text:="Cäsar", index:=3
.BeginGroup = True
.Width = 100
.DropDownLines = 3
.DropDownWidth = 100
.ListIndex = 1
.OnAction = "Probe"
End With
'.....
Sub Probe()
??? index = Application.CommandBars("Symbolleiste_1").Controls. ListIndex
MsgBox index
z. B. MsgBox Bert
oder MsgBox Anton
End Sub