Individual values from a Combobox List placed in textboxes

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....
 
S

Susan

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
 
G

Guest

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top