ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Stay in Combobox when reaching end (https://www.excelbanter.com/excel-programming/314720-stay-combobox-when-reaching-end.html)

akyhne[_2_]

Stay in Combobox when reaching end
 
When I tab into my Combobox and with <keydown scrolls down through the
values in it I have this problem:
When I reach the last value and once more press the <Keydown the cursor
jumps out of the Combobox and to the next Tabstop.

I have the same problem with my Listboxes

Bob Phillips[_6_]

Stay in Combobox when reaching end
 
I have just tried it on a userform and it stays in the listbox for me.

Do you have any control code for these boxes?

--

HTH

RP

"akyhne" wrote in message
...
When I tab into my Combobox and with <keydown scrolls down through the
values in it I have this problem:
When I reach the last value and once more press the <Keydown the cursor
jumps out of the Combobox and to the next Tabstop.

I have the same problem with my Listboxes




akyhne[_2_]

Stay in Combobox when reaching end
 
The only code besides the properties for the Combobox is this:

Private Sub ComboBox8_1_DropButtonClick()
Me.Controls("ComboBox8_1").RowSource =
Range("ANLGSSAML").Offset(1).Range("A1:A" & Tael16).Address
End Sub

Private Sub ComboBox8_1_Enter()
Me.Controls("ComboBox8_1").RowSource =
Range("ANLGSSAML").Offset(1).Range("A1:A" & Tael16).Address
End Sub


"Bob Phillips" skrev:

I have just tried it on a userform and it stays in the listbox for me.

Do you have any control code for these boxes?

--

HTH

RP

"akyhne" wrote in message
...
When I tab into my Combobox and with <keydown scrolls down through the
values in it I have this problem:
When I reach the last value and once more press the <Keydown the cursor
jumps out of the Combobox and to the next Tabstop.

I have the same problem with my Listboxes





akyhne[_2_]

Stay in Combobox when reaching end
 
You will have to have a TextBox on the same form (with Tabstop enabled) so
that when you reach the end of the ComboBox your curser has somewhere to go

"Bob Phillips" skrev:

I have just tried it on a userform and it stays in the listbox for me.

Do you have any control code for these boxes?

--

HTH

RP

"akyhne" wrote in message
...
When I tab into my Combobox and with <keydown scrolls down through the
values in it I have this problem:
When I reach the last value and once more press the <Keydown the cursor
jumps out of the Combobox and to the next Tabstop.

I have the same problem with my Listboxes





Stephen Bullen[_4_]

Stay in Combobox when reaching end
 
Hi Akyhne,

When I tab into my Combobox and with <keydown scrolls down through the
values in it I have this problem:
When I reach the last value and once more press the <Keydown the cursor
jumps out of the Combobox and to the next Tabstop.


Use the KeyDown event to check if the down key is being pressed when the
listindex = listcount-1 and set the key to 0 if so. (You can also check if
the Up key is being pressed with a listindex = 0).

Regards

Stephen Bullen
Microsoft MVP - Excel
www.oaltd.co.uk




All times are GMT +1. The time now is 05:43 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com