Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi
I am trying to create a User from that has a drop-down for the user to select from a pre-defined list. I have created a combobox on the user form and have no idea how to populate my list into this when the form opens for the user. Is there is something really basic I am missing here? I have tried playing around with ComboBox.AddItem "xxx" for example. The combo box is still blank when I open the user form:( Martin |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
You've got it but I think your timing is off. Where are you adding items.
Typically you activate the userform with userform1.show somewhere like in the workbook open event, well before you show it, add all of your items. -- -John Please rate when your question is answered to help us and others know what is helpful. " wrote: Hi I am trying to create a User from that has a drop-down for the user to select from a pre-defined list. I have created a combobox on the user form and have no idea how to populate my list into this when the form opens for the user. Is there is something really basic I am missing here? I have tried playing around with ComboBox.AddItem "xxx" for example. The combo box is still blank when I open the user form:( Martin |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]() Excellent, thanks dude :) On 14 Aug, 19:38, John Bundy (remove) wrote: You've got it but I think your timing is off. Where are you adding items. Typically you activate the userform with userform1.show somewhere like in the workbook open event, well before you show it, add all of your items. -- -John Please rate when your question is answered to help us and others know what is helpful. " wrote: Hi I am trying to create a User from that has a drop-down for the user to select from a pre-defined list. I have created a combobox on the user form and have no idea how to populate my list into this when the form opens for the user. Is there is something really basic I am missing here? I have tried playing around with ComboBox.AddItem "xxx" for example. The combo box is still blank when I open the user form:( Martin |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
There are two ways to populate the combobox. If it is a single column and
your data source is located in a single row or single column on the worksheet, you can use the row source in the combobox properties by entering the cell range reference, exmp: a10:a20. If you want to use the AddItem method. Put it in the UserForm_Initialize code module. When you then execute the command UserForm1.Show, the Initialize code executes first and loads the combo box. "John Bundy" wrote: You've got it but I think your timing is off. Where are you adding items. Typically you activate the userform with userform1.show somewhere like in the workbook open event, well before you show it, add all of your items. -- -John Please rate when your question is answered to help us and others know what is helpful. " wrote: Hi I am trying to create a User from that has a drop-down for the user to select from a pre-defined list. I have created a combobox on the user form and have no idea how to populate my list into this when the form opens for the user. Is there is something really basic I am missing here? I have tried playing around with ComboBox.AddItem "xxx" for example. The combo box is still blank when I open the user form:( Martin |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Help needed - populating comboboxes from list?? | Excel Programming | |||
Populating Comboboxes | Excel Programming | |||
Comboboxes on userforms | Excel Programming | |||
comboboxes, userforms and class modules | Excel Programming | |||
Populating ComboBoxes | Excel Programming |