Filling a combo box from another workbook

J

John

This may be a stupid question for you gurus, but I need to
fill in a combo box from a column in another worksheet in
another workbook.

For example, I am designing a userform to allow the user
to scroll through a list of states, they can click on a
state and hit the Ok button.
I'm using a combobox and a command button, if this is not
the best design please feel free to let me know as this is
my first time doing this.

Thanks
 
G

GJones

-----Original Message-----
This may be a stupid question for you gurus, but I need to
fill in a combo box from a column in another worksheet in
another workbook.

For example, I am designing a userform to allow the user
to scroll through a list of states, they can click on a
state and hit the Ok button.
I'm using a combobox and a command button, if this is not
the best design please feel free to let me know as this is
my first time doing this.

Thanks
.
Use VBA and the Add Item method to populate the combo
box. Then you can get the information from a different
place.

Thanks,
Greg
 
J

John

Thanks for the feedback Tom, now can you tell me how to
get the list of states into the combo box?

Thanks.
 
T

Tom Ogilvy

If you have them on a worksheet, go into the vbe and get the properties
window for the combobox. go to the rowsource property and put in text like

Sheet1!A1:A50

this should load the combobox with your state names when the form is shown.
 

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