Cycling through form fields
Help
I can use FOR statements with a range in a spreadsheet...
i.e: For Rownumber = 5 To EndOfList
'Gets the name and whether outstanding or not from the
spreadsheet
VName = Range("A" & Rownumber).Value
VOut = Range("J" & Rownumber).Value
But I want to know how to cycle through a set of comboboxes using a
WITH statement.
i.e: For x = 1 To 15
vBoxName = (cboxDay & x)
With vBoxName
.additem ("1")
.additem ("2")
...
End With
Next
I can't seem to get the syntax correct to fill the field cboxDay1,
then fill the box cboxDay2 ..... with the same info.
I don't want to have to right the same code out for all 45 boxes.
Any solution would be appreciated.
cheers
Aaron
|