Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Combo boxes in userform auto drop down problem
Hi guys,
I'm using the following for a series of comboxes to display the dd list when the combobox is selected (using tab as opposed to mouse clicks). Private Sub ComboBox2_Enter() ComboBox2.DropDown End Sub This works fine,but only on alternate boxes! ComboBox2 works fine, 3 doesn't work, 4 does & so on. Any ideas? Cheers, JF. |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Combo boxes in userform auto drop down problem
The problem is that a combo box cannot drop down while another is in the
state. So you have to give the departing combobox a little time to close: Assuming the userform has 4 comboboxes: Private Sub UserForm_Initialize() ComboBox1.List = Array("a", "b", "c") ComboBox2.List = Array("a", "b", "c") ComboBox3.List = Array("a", "b", "c") ComboBox4.List = Array("a", "b", "c") End Sub Private Sub ComboBox1_Enter() Set CB = ComboBox1 Application.OnTime Now, "DD" End Sub Private Sub ComboBox2_Enter() Set CB = ComboBox2 Application.OnTime Now, "DD" End Sub Private Sub ComboBox3_Enter() Set CB = ComboBox3 Application.OnTime Now, "DD" End Sub Private Sub ComboBox4_Enter() Set CB = ComboBox4 Application.OnTime Now, "DD" End Sub And in a standard module: Public CB As ComboBox Sub DD() CB.DropDown End Sub -- Jim wrote in message ... | Hi guys, | | I'm using the following for a series of comboxes to display the dd | list when the combobox is selected (using tab as opposed to mouse | clicks). | | Private Sub ComboBox2_Enter() | ComboBox2.DropDown | End Sub | | This works fine,but only on alternate boxes! ComboBox2 works fine, 3 | doesn't work, 4 does & so on. | | Any ideas? | | Cheers, | JF. |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Combo boxes in userform auto drop down problem
Cheers Jim, I'll give it a go in a bit.
On 6 Mar, 14:53, "Jim Rech" wrote: The problem is that a combo box cannot drop down while another is in the state. *So you have to give the departing combobox a little time to close: Assuming the userform has 4 comboboxes: Private Sub UserForm_Initialize() * * ComboBox1.List = Array("a", "b", "c") * * ComboBox2.List = Array("a", "b", "c") * * ComboBox3.List = Array("a", "b", "c") * * ComboBox4.List = Array("a", "b", "c") End Sub Private Sub ComboBox1_Enter() * * Set CB = ComboBox1 * * Application.OnTime Now, "DD" End Sub Private Sub ComboBox2_Enter() * * Set CB = ComboBox2 * * Application.OnTime Now, "DD" End Sub Private Sub ComboBox3_Enter() * * Set CB = ComboBox3 * * Application.OnTime Now, "DD" End Sub Private Sub ComboBox4_Enter() * * Set CB = ComboBox4 * * Application.OnTime Now, "DD" End Sub And in a standard module: Public CB As ComboBox Sub DD() * * CB.DropDown End Sub -- wrote in message ... | Hi guys, | | I'm using the following for a series of comboxes to display the dd | list when the combobox is selected (using tab as opposed to mouse | clicks). | | Private Sub ComboBox2_Enter() | ComboBox2.DropDown | End Sub | | This works fine,but only on alternate boxes! ComboBox2 works fine, 3 | doesn't work, 4 does & so on. | | Any ideas? | | Cheers, | JF. |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
Combo boxes in userform auto drop down problem
Thanks again JR - it worked great.
Cheers, JF |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Combo boxes and drop down lists | Excel Worksheet Functions | |||
Row Selection using Drop down/Combo boxes | Excel Discussion (Misc queries) | |||
Using Drop Downs Or Combo Boxes to Look up and display Info | Excel Discussion (Misc queries) | |||
Problem Adding new Combo Boxes | Excel Discussion (Misc queries) | |||
Adding to auto-filter combo boxes | Excel Programming |