ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Searching in a user form / List box (https://www.excelbanter.com/excel-programming/345944-searching-user-form-list-box.html)

Idokras

Searching in a user form / List box
 

Hello,

I have created a user form with msforms and a long long list of names
(authors, to be exact) in a list box to choose from. Now, if I'm
looking for, say, "Smith", I type "S" which takes me to the first
author whose name starts with "S", say Samson. What I would like now is
that if I type in "M" now that it takes me to the names starting with
"Sm" and so on. This kind of search would save a LOT of time. Instead,
typing "M" takes me to the M-authors, of course.

Is there a way to implement this? Also, this kind of search has a
special name - I forgot it right now...can anybody help me out?

It's been bugging me for weeks and I'd be very grateful if anybody
could give me a hint.

Thanks,
Max


--
Idokras
------------------------------------------------------------------------
Idokras's Profile: http://www.excelforum.com/member.php...o&userid=28873
View this thread: http://www.excelforum.com/showthread...hreadid=486209


Dave Peterson

Searching in a user form / List box
 
When you're in the VBE, select your listbox on your userform.
Hit F4 to see the properties window
Look for MatchEntry

There's a fmMatcheEntryComplete that sounds like what you want.

Idokras wrote:

Hello,

I have created a user form with msforms and a long long list of names
(authors, to be exact) in a list box to choose from. Now, if I'm
looking for, say, "Smith", I type "S" which takes me to the first
author whose name starts with "S", say Samson. What I would like now is
that if I type in "M" now that it takes me to the names starting with
"Sm" and so on. This kind of search would save a LOT of time. Instead,
typing "M" takes me to the M-authors, of course.

Is there a way to implement this? Also, this kind of search has a
special name - I forgot it right now...can anybody help me out?

It's been bugging me for weeks and I'd be very grateful if anybody
could give me a hint.

Thanks,
Max

--
Idokras
------------------------------------------------------------------------
Idokras's Profile: http://www.excelforum.com/member.php...o&userid=28873
View this thread: http://www.excelforum.com/showthread...hreadid=486209


--

Dave Peterson

Idokras[_2_]

Searching in a user form / List box
 

Thanks, worked like a charm! Saves me a lot of time, so thanks.


--
Idokras
------------------------------------------------------------------------
Idokras's Profile: http://www.excelforum.com/member.php...o&userid=28873
View this thread: http://www.excelforum.com/showthread...hreadid=486209



All times are GMT +1. The time now is 12:01 PM.

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