Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Down button goes past bottom of combobox list to next object.
Hi guys,
Here's something strange I can't figure out... I have a userform with multiple comboboxes & command buttons. Using the down arrow to pick from the dd list of any of the comboboxes is fine, but if I keep pressing down at the bottom of a list the object underneath the active object is selected - I had expected the last item in the list to still be selected! Anyone make any sense of this & know how to stop it happening? Cheers, JF. |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Down button goes past bottom of combobox list to next object.
It does and I am not sure why, but one my get around is to add a blank item
to the combobox then monitor the combobox for changes and force it to scroll to top of list when it reaches the end.........you will need to add same code for each offending box, or probably all of them to make the interface consistent. Not too elegant but it works. Private Sub ComboBox1_Change() With ComboBox1 If .ListIndex = .ListCount - 1 Then .ListIndex = 0 End With End Sub -- Regards, Nigel wrote in message ... Hi guys, Here's something strange I can't figure out... I have a userform with multiple comboboxes & command buttons. Using the down arrow to pick from the dd list of any of the comboboxes is fine, but if I keep pressing down at the bottom of a list the object underneath the active object is selected - I had expected the last item in the list to still be selected! Anyone make any sense of this & know how to stop it happening? Cheers, JF. |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Down button goes past bottom of combobox list to next object.
Thanks for the speedy response Nigel.
That works great; I altered it a little to make it stop at the bottom of the list: If .ListIndex = .ListCount - 1 Then .ListIndex = .ListIndex - 1 Thanks for your help. Cheers, JF. On Apr 14, 12:29*pm, "Nigel" wrote: It does and I am not sure why, but one my get around is to add a blank item to the combobox then monitor the combobox for changes and force it to scroll to top of list when it reaches the end.........you will need to add same code for each offending box, or probably all of them to make the interface consistent. *Not too elegant but it works. Private Sub ComboBox1_Change() *With ComboBox1 * If .ListIndex = .ListCount - 1 Then .ListIndex = 0 *End With End Sub -- Regards, Nigel wrote in message ... Hi guys, Here's something strange I can't figure out... I have a userform with multiple comboboxes & command buttons. Using the down arrow to pick from the dd list of any of the comboboxes is fine, but if I keep pressing down at the bottom of a list the object underneath the active object is selected - I had expected the last item in the list to still be selected! Anyone make any sense of this & know how to stop it happening? Cheers, JF.- Hide quoted text - - Show quoted text - |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Code to automatically sort a list, each time that a new entry isadded to the bottom of the list | Excel Programming | |||
Combobox Properties (Text Wrap and Center from Top to Bottom) How? | Excel Programming | |||
Extracting Top 5 & Bottom 5 Variances using a Macro Button | Excel Programming | |||
ComboBox list reliant on the entry from a different ComboBox | Excel Programming | |||
Option button object proeprties or object not found in vba | Excel Programming |