Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Populating a combo box at run time
Hi, I have a couple of comboboxes - the contents of the second are dependent
on the selection in the first one. I have this part running fine. the problem I am having is that when a new option is selected in the first combo box the contents of the second combobox do not change until the dropbuttonclick even. To make things clear here is the order of operations: user clicks the drop down arrow on combobox 1 user then makes a selection from combobox 1 this calls the code to populate the second combobox dependant on what user has selected THIS IS WHERE THE PROBLEM IS - basically i want the first option of the new list to be automatically displayed in the combobox now - however, the old value is left there until the user clicks the drop down arrow. Hope this makes sense. Can anyone help me out? thanks for reading this. |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Populating a combo box at run time
Private Sub combobox1_Click()
' code that populates comobobox2 Combobox2.Listindex = 1 End sub -- Regards, Tom Ogilvy "Graham Whitehead" wrote: Hi, I have a couple of comboboxes - the contents of the second are dependent on the selection in the first one. I have this part running fine. the problem I am having is that when a new option is selected in the first combo box the contents of the second combobox do not change until the dropbuttonclick even. To make things clear here is the order of operations: user clicks the drop down arrow on combobox 1 user then makes a selection from combobox 1 this calls the code to populate the second combobox dependant on what user has selected THIS IS WHERE THE PROBLEM IS - basically i want the first option of the new list to be automatically displayed in the combobox now - however, the old value is left there until the user clicks the drop down arrow. Hope this makes sense. Can anyone help me out? thanks for reading this. |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Populating a combo box at run time
Ok, my problem is how do you do the first part of your post?
I have a combobox that I need to pick up a list which is determined by another combobox. i.e combobox1 is criteria A, I then need all the data in another sheet that one column matches this criteria to be available in combobox2. I have too many records to manually sort and is not practical to have to create lists manually. What I need is some way of picking out all of criteria A automatically. Hope you can help, thanks. "Tom Ogilvy" wrote: Private Sub combobox1_Click() ' code that populates comobobox2 Combobox2.Listindex = 1 End sub -- Regards, Tom Ogilvy "Graham Whitehead" wrote: Hi, I have a couple of comboboxes - the contents of the second are dependent on the selection in the first one. I have this part running fine. the problem I am having is that when a new option is selected in the first combo box the contents of the second combobox do not change until the dropbuttonclick even. To make things clear here is the order of operations: user clicks the drop down arrow on combobox 1 user then makes a selection from combobox 1 this calls the code to populate the second combobox dependant on what user has selected THIS IS WHERE THE PROBLEM IS - basically i want the first option of the new list to be automatically displayed in the combobox now - however, the old value is left there until the user clicks the drop down arrow. Hope this makes sense. Can anyone help me out? thanks for reading this. |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Excel VBA Combo Box Populating dependent on other combo box choices | Excel Programming | |||
Populating Combo Boxes | Excel Programming | |||
Populating a combo box | Excel Programming | |||
Populating a Combo Box | Excel Programming | |||
Populating Combo Boxes | Excel Programming |