Dim a As Integer, s As String, c As ComboBox
For a = 6 To 10
s = "ComboBox" & a
c = UserForm1.Controls(s)
c.List = arrA
Next a
Ich möchte hiermit Comboboxen 6-10 jeweils mit dem Inhalt der Zellen z.b. A2:A20 füllen.
In der Zeile
c = UserForm1.Controls(s)
bricht der Ablauf ab, in der bubble help steht 'c = nothing'. in der bubble help von s steht aber 's = "Combobox6"'.
Wie kann man das beheben?