A
anon
Hi,
I can update the rowsource of an individual combobox programatically
using the below;
ComboBox2.RowSource = "details!g4:g24"
however i need to do a lot at a time, looping through them one by one.
I had hoped I could use something similar to the below;
Dim cmbo
For i = 4 To 34
cmbo = ComboBox & i
cmbo.RowSource = "details!c4:c24"
next i
etc however this errors on the cmbo.RowSource part
I have tried changing the line to;
"ComboBox & i".RowSource
and this errors. I have also tried changing ComboBox & i to "ComboBox"
& i however this does not work either.
Any suggestions for where i'm going wrong?
My comboboxes are named ComboBox4 through to ComboBox34
Thanks,
I can update the rowsource of an individual combobox programatically
using the below;
ComboBox2.RowSource = "details!g4:g24"
however i need to do a lot at a time, looping through them one by one.
I had hoped I could use something similar to the below;
Dim cmbo
For i = 4 To 34
cmbo = ComboBox & i
cmbo.RowSource = "details!c4:c24"
next i
etc however this errors on the cmbo.RowSource part
I have tried changing the line to;
"ComboBox & i".RowSource
and this errors. I have also tried changing ComboBox & i to "ComboBox"
& i however this does not work either.
Any suggestions for where i'm going wrong?
My comboboxes are named ComboBox4 through to ComboBox34
Thanks,