Individual values from a Combobox List placed in textboxes

  • Thread starter Thread starter Corey
  • Start date Start date
C

Corey

How can I place 1 Value from a Combobox List into a separate Textboxes.
EG. If the Combobox list has 20 values, then each value placed into 20 different textboxes.

How can i do that ?
Corey....
 
how are the combobox values added? did you add them one at a time?
or is it a range on a worksheet?

if it's a range, you can add them to each textbox, as in.........

me.txtfirst.value = sheets("nameofsheet").range("a5")
me.txtsecond.value=sheets("nameofsheet").range("a6")
for example.

if you added them individually via code using the .additem method, i
would think you could also declare them as a variable & then load
the variable.value into the textboxes.
susan
 
assuming there are enough textboxes and they are named sequentially such as
Textbox1, Textbox2, etc.

for i = 0 to listbox1.listcount - 1
me.controls("Textbox" & i + 1).Value = Listbox1.List(i)
Next
 
Back
Top