I have a problem with VBA in Excel. My goal was to have a Userform with several comboboxes, with all the same content, which is extracted from a Excel-chart. I used the command
ComboBox.Rowsource = "A1:A10"
And that for every combobox i had in my userform. then i realized it was much code, because i wrote this command for every box again. So i tried out to use a string array, lets call it "A", with the content "Combobox1" and "Combobox2" and so on. But when i tried to use this in the code -
for i = 1 to 10
A(i-1).rowsource = "A1:A10"
next
- i got the warning: Compile Error: Invalide qualifier
What is my mistake?
Many Thanks for any help, D.K.
compile error
we will need to see the complete code. – Daniel Dušek