Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 21
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 533
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 21
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 21
Default Combo boxes in userform auto drop down problem

Thanks again JR - it worked great.

Cheers,
JF
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Combo boxes and drop down lists Rosalie Excel Worksheet Functions 0 April 14th 09 04:10 AM
Row Selection using Drop down/Combo boxes Ed Excel Discussion (Misc queries) 1 April 25th 07 08:53 PM
Using Drop Downs Or Combo Boxes to Look up and display Info Wyveryn Excel Discussion (Misc queries) 2 October 4th 06 02:43 AM
Problem Adding new Combo Boxes [email protected] Excel Discussion (Misc queries) 2 September 12th 06 09:58 AM
Adding to auto-filter combo boxes bsherwood Excel Programming 1 March 10th 06 04:57 PM


All times are GMT +1. The time now is 07:28 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"