ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Listbox Select items with Keyboard. (https://www.excelbanter.com/excel-programming/359050-listbox-select-items-keyboard.html)

Casey[_75_]

Listbox Select items with Keyboard.
 

Hi,
I have a listbox whose RowSource is changed depending on which command
button is clicked. I have been able to transfer the focus from the
command button to the listbox as the command button is clicked,
however, I can’t seem to find a way to select items from the listbox
using just the keyboard, selecting with the mouse works just fine but I
would like to make it keyboard friendly.
I have tried changing the ListStyle and every key combo I can think of.
I’m beginning to think it might not be possible. I need some help from
the experts.


--
Casey


------------------------------------------------------------------------
Casey's Profile: http://www.excelforum.com/member.php...fo&userid=4545
View this thread: http://www.excelforum.com/showthread...hreadid=533484


Dick Kusleika[_4_]

Listbox Select items with Keyboard.
 
Casey wrote:
Hi,
I have a listbox whose RowSource is changed depending on which command
button is clicked. I have been able to transfer the focus from the
command button to the listbox as the command button is clicked,
however, I can't seem to find a way to select items from the listbox
using just the keyboard, selecting with the mouse works just fine but
I would like to make it keyboard friendly.
I have tried changing the ListStyle and every key combo I can think
of. I'm beginning to think it might not be possible. I need some help
from the experts.


Casey: I don't think you can do that. You can use the arrow keys and the
space bar to select items in the box. Also, check out

http://www.dailydoseofexcel.com/arch...mit-a-listbox/
http://www.dailydoseofexcel.com/arch...ifferent-view/

which provide a method to limit what is shown in the listbox.

--
Dick Kusleika
MS MVP - Excel
www.dailydoseofexcel.com



Casey[_76_]

Listbox Select items with Keyboard.
 

Dick,
Thank you. That was exactly what I was looking for, the keystrokes to
select items. The listbox works fine using the arrow keys and the
spacebar for selecting items from the list.
I think my question had a bit too much unneeded information. Thanks
again for the response and the two links for me to study.


--
Casey


------------------------------------------------------------------------
Casey's Profile: http://www.excelforum.com/member.php...fo&userid=4545
View this thread: http://www.excelforum.com/showthread...hreadid=533484



All times are GMT +1. The time now is 11:40 AM.

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