vor kurzem wollte ich ein Kombinationsfeld mit Werten aus der Auswahl von Optionsfeldern füllen.
Dank Gerd L Hilfe hat es mit folgendem Code Super geklappt:
Tabelle2.DropDowns("Dropdown20").ListFillRange = ""
Tabelle2.DropDowns("Dropdown20").ListFillRange = _
Switch(Application.Caller = "Optionsfeld 11", "Werte!B43:B60", _
Application.Caller = "Optionsfeld 12", "Werte!C43:C50", _
Application.Caller = "Optionsfeld 13", "Werte!D43:D47", _
Application.Caller = "Optionsfeld 14", "Werte!E43:E51", _
Application.Caller = "Optionsfeld 15", "Werte!F43:F50", _
Application.Caller = "Optionsfeld 16", "Werte!G43:G54", _
Application.Caller = "Optionsfeld 17", "Werte!H43:H48", _
Application.Caller = "Optionsfeld 8", "Werte!I43:I46", _
Application.Caller = "Optionsfeld 9", "Werte!J43:J43")
Jetzt benötige ich das gleiche für ein Listenfeld. Die änderung kann ja nur minimal sein....Habe es trotzdem nicht hinbekommen.
Musste es nicht in der Art aussehen ?:
Tabelle2.ListBox("Listenfeld 35").ListFillRange = ""
Tabelle2.ListBox("Listenfeld 35").ListFillRange = _
Switch(Application.Caller = "Optionsfeld 11", "Werte!B43:B60", _
Application.Caller = "Optionsfeld 12", "Werte!C43:C50", _
Application.Caller = "Optionsfeld 13", "Werte!D43:D47", _
Application.Caller = "Optionsfeld 14", "Werte!E43:E51", _
Application.Caller = "Optionsfeld 15", "Werte!F43:F50", _
Application.Caller = "Optionsfeld 16", "Werte!G43:G54", _
Application.Caller = "Optionsfeld 17", "Werte!H43:H48", _
Application.Caller = "Optionsfeld 8", "Werte!I43:I46", _
Application.Caller = "Optionsfeld 9", "Werte!J43:J43")
wäre toll, wenn mir einer auf die Sprünge helfen könnte.Vielen Dank in Voraus
Ralf