Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default List Box and Quick selecton of item in drop down

This may be a real simple issue, but I am, unforutnately, not that savy
with VBA and the help isn't helping on this one.

I have a list box whose drop down menu contains a set of states.
for example:

Arizona
California
Utah
Washington
Wisconsin

Currently, if the user wishes to select Wisconsin they must scroll to
the bottom of the list. In other applications I have seen on the web,
the user could type "W" and the drop down menu would automatically
access Washington, the 1st state with a W. Is anyone familiar with a
function that can be built into a listbox?

Thanks,
Katie


---
Message posted from http://www.ExcelForum.com/

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 6
Default List Box and Quick selecton of item in drop down

"Katie412 " wrote in message
...
This may be a real simple issue, but I am, unforutnately, not that savy
with VBA and the help isn't helping on this one.

I have a list box whose drop down menu contains a set of states.
for example:

Arizona
California
Utah
Washington
Wisconsin

Currently, if the user wishes to select Wisconsin they must scroll to
the bottom of the list. In other applications I have seen on the web,
the user could type "W" and the drop down menu would automatically
access Washington, the 1st state with a W. Is anyone familiar with a
function that can be built into a listbox?

Thanks,
Katie



Hi Katie !

Quite frankly, that's exactly how a listbox is supposed to work in VBA. Have
verified it with short example that I set up on my machine. I added a
ListBox to a UserForm, and added entries to that list like below (not very
elegant, but it works ...) :

Me.ListBox1.AddItem("Arizona")
Me.ListBox1.AddItem("California")
etc.etc.

And when you get the UserForm into "run" mode, click on the listbox and
press the "W" key, the selection *does* jump to Washington. In fact, this
works for both, ListBox and ComboBox controls - given the case that the
control *does* have the focus at the time you press the respective key.

cheers,
Markus



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 459
Default List Box and Quick selecton of item in drop down

Take a look at the ListBox's MatchEntry property e.g. set it to
fmMatchEntryFirstLetter.

--

Katie412 wrote in message ...
This may be a real simple issue, but I am, unforutnately, not that savy
with VBA and the help isn't helping on this one.

I have a list box whose drop down menu contains a set of states.
for example:

Arizona
California
Utah
Washington
Wisconsin

Currently, if the user wishes to select Wisconsin they must scroll to
the bottom of the list. In other applications I have seen on the web,
the user could type "W" and the drop down menu would automatically
access Washington, the 1st state with a W. Is anyone familiar with a
function that can be built into a listbox?

Thanks,
Katie


---
Message posted from http://www.ExcelForum.com/

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default List Box and Quick selecton of item in drop down

Thank you for your tips!! I will give it a shot.

Katie :-)


---
Message posted from http://www.ExcelForum.com/

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
ADD ITEM TO A DROP DOWN LIST? William Excel Discussion (Misc queries) 4 September 8th 08 09:05 PM
Quick Find in long drop down list Candyman New Users to Excel 3 May 30th 08 06:29 PM
drop down list/typing item from list error Strike Eagle Loader[_2_] Excel Worksheet Functions 1 May 1st 07 06:35 PM
Quick Seek Data in Drop Down List OCS_IT Excel Worksheet Functions 4 December 6th 06 09:53 PM
quick selection drop down list 68magnolia71 Excel Worksheet Functions 3 April 26th 05 09:30 PM


All times are GMT +1. The time now is 03:42 AM.

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

About Us

"It's about Microsoft Excel"