LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 395
Default Userform combobox: best match on partially typed content?

I've added a combobox to my userform. Exact match is required.

When I begin typing, if there is one or more exact match, it will pre-fill
the combobox text with the first possible exact match. Once I am close to the
target selection, I can just click the drop-down arrow and select my target
item.

However, if I mis-type or am a letter off of a valid selection, when I click
the down arrow, instead of being at the last acceptable match, it puts me
back at the top of the list.

In this particular case, the combobox may have several thousand entries, and
the spelling of some items are not intuitive. Is there any way to force the
combobox to stay at the last found match? For example, to programmatically
capture the last valid match (which the combobox has somewhere, because it is
pre-populating it), and then use that value to force the combobox location
even if the currently typed text is not a valid match for anything on the
list?

For example, if the desired match is "G425 p2 Electric" and another item is
"G425 e Electric" then I get a match up through typing "G425 ". If I stop
there and hit the combobox dropdown, I'll see my match in the list near the
exact match I'm on. However, if I type "G425 p El" because I didn't know
there was a "2" on this item, it plops me back at the very beginning of the
list, instead of still being in the part of the list where I could easily
find the target item.

So, I'm looking for how to capture the valid match item ID (each time a
match is made), and how to force the combobox to go to that location when the
dropdown is selected, even if the current text is not an exact match.

Thanks!
Keith


 
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
C# Excel cell content partially strikeout MonkeyMonkey Excel Programming 0 October 17th 07 03:12 PM
Need rows in Column A removed if they fully or partially match with any Column B row [email protected] Excel Discussion (Misc queries) 1 August 21st 05 11:41 PM
Userform: Combobox, dates, match required- can't get date format to work KR Excel Programming 2 November 10th 04 05:18 PM
How do i refer to the text typed in a combobox? john q public[_6_] Excel Programming 2 October 28th 04 08:36 PM
ComboBox, referring to content Zurn[_14_] Excel Programming 0 September 29th 04 07:07 AM


All times are GMT +1. The time now is 07:59 AM.

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"