ich habe da eine Frage zur Befüllung einer mehrspaltigen Combobox. Mit dem untenstehenden Code funktioniert es, dass eine dreispaltige CBox korrekt befüllt wird. Jetzt habe ich aber das Problem, dass in einer weiteren CBox nur ein Teil des Tabellenbereichs (A3:M50) in die CBox eingetragen werden soll, und zwar "B3:B50", "K3:K50" und "M3:M50".
Wie bekomme ich das hin? Ich habe es schon mal wie nachstehend probiert, aber das klappt nicht.
varArray = .Range("B3:B50"; "K3:K50"; "M3:M50")
Wäre toll, wenn mir da jemand einen Tipp geben könnte.
Danke
Ralph
==========================================
Priva te Sub Userform_Activate()
Dim i As Integer
Dim varArray
With Worksheets("Tabelle1")
varArray = .Range("A3:M50")
End With
Call QuickSort(1, UBound(varArray), varArray)
With UserForm1
.ComboBox1.ColumnCount = 3
.ComboBox1.ColumnWidths = "40 pt;50 pt;40 pt; 50 pt"
.ComboBox1.List = varArray
'Leereinträge aus Tabelle Spalte AF in Combobox-Auswahlliste löschen
For i = .ComboBox1.ListCount - 1 To 0 Step -1
If .ComboBox1.List(i, 0) = "" Then
.ComboBox1.RemoveItem (i)
End If
Next i
.ComboBox1.ListIndex = -1 'normal ist 0, mit "-1" wird die CBox beim Initialisieren
'ohne Inhalt angezeigt.
End With
==========================================