Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 21
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 735
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 21
Default 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
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
Code to automatically sort a list, each time that a new entry isadded to the bottom of the list Mike C[_5_] Excel Programming 5 April 13th 08 04:59 PM
Combobox Properties (Text Wrap and Center from Top to Bottom) How? Corey Excel Programming 1 December 29th 06 04:49 AM
Extracting Top 5 & Bottom 5 Variances using a Macro Button william4444[_3_] Excel Programming 0 June 23rd 06 02:44 AM
ComboBox list reliant on the entry from a different ComboBox ndm berry[_2_] Excel Programming 4 October 4th 05 04:40 PM
Option button object proeprties or object not found in vba Pete Straman S via OfficeKB.com Excel Programming 0 August 31st 05 05:49 PM


All times are GMT +1. The time now is 06:06 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"