Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
New offering: Class to handle multi key presses in sorted list
This one stemmed from frustration with trying to select items in a list of
several thousand alphabetically sorted items. Unlike the Windows list handlers, Excel only reacts to a single key press. Pressing "A" then "B" in quick succession will move you to the first entry starting in "B", not to those starting "AB". So, rather than write custom code for each list with lots of entries, I created a class module that can be initialised for any list in a form. Multiple class objects can also be created and assigned to multiple lists. Usage is a doddle. All it needs is three lines of code. The class is available for anyone who wants to try it out on my site at the link below. http://www.enhanceddatasystems.com/E...istHandler.htm Please let me know if you find ways to improve on it. Robin Hammond www.enhanceddatasystems.com |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
New offering: Class to handle multi key presses in sorted list
Robin,
Nice... BUT I've made following changes to your "normal" listbox and to me there's hardly any difference. Properties: MatchEntry - MatchEntryComplete Private Sub lstNorm_change() With lstNorm If Left(.List(.TopIndex), 2) < Left(.List(.ListIndex), 2) Then lstNorm.TopIndex = lstNorm.ListIndex End If End With End Sub Ofcourse the above is cheating a little.. since your test items are 3 chars only, but i doubt if testing with longer strings would make a big difference. sorry ;-) -- keepITcool | www.XLsupport.com | keepITcool chello nl | amsterdam Robin Hammond wrote in message : http://www.enhanceddatasystems.com/E...istHandler.htm |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
New offering: Class to handle multi key presses in sorted list
I think I'll just go and bury my head in the sand as far as basic lists are
concerned. There's some upside from the inputtime control I guess. Oh well, just trying to be helpful. Robin "keepITcool" wrote in message ... Robin, Nice... BUT I've made following changes to your "normal" listbox and to me there's hardly any difference. Properties: MatchEntry - MatchEntryComplete Private Sub lstNorm_change() With lstNorm If Left(.List(.TopIndex), 2) < Left(.List(.ListIndex), 2) Then lstNorm.TopIndex = lstNorm.ListIndex End If End With End Sub Ofcourse the above is cheating a little.. since your test items are 3 chars only, but i doubt if testing with longer strings would make a big difference. sorry ;-) -- keepITcool | www.XLsupport.com | keepITcool chello nl | amsterdam Robin Hammond wrote in message : http://www.enhanceddatasystems.com/E...istHandler.htm |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
New offering: Class to handle multi key presses in sorted list
Robin,
I did some further testing on your handler. with a different set of items... (40320 permuts of "ABCDEFGH") Your handler will not test on the existence of an item. Rather it will generated an error and your handler will show the generic messagebox "an error occured in the listhandler" rather confusing.. Further in your handling code I found that your class appears to be handling MultiSelect boxes... And although multiselect is rather difficult to combine with typing, I thought I'd give it a try... and set the "handled" box to multiselectextended... which throws an error on each keypress. -- keepITcool | www.XLsupport.com | keepITcool chello nl | amsterdam Robin Hammond wrote in message : This one stemmed from frustration with trying to select items in a list of several thousand alphabetically sorted items. Unlike the Windows list handlers, Excel only reacts to a single key press. Pressing "A" then "B" in quick succession will move you to the first entry starting in "B", not to those starting "AB". So, rather than write custom code for each list with lots of entries, I created a class module that can be initialised for any list in a form. Multiple class objects can also be created and assigned to multiple lists. Usage is a doddle. All it needs is three lines of code. The class is available for anyone who wants to try it out on my site at the link below. http://www.enhanceddatasystems.com/E...istHandler.htm Please let me know if you find ways to improve on it. Robin Hammond www.enhanceddatasystems.com |
#5
Posted to microsoft.public.excel.programming
|
|||
|
|||
New offering: Class to handle multi key presses in sorted list
Could you email me the file. Thanks.
Robin Hammond www.enhanceddatasystems.com "keepITcool" wrote in message ... Robin, I did some further testing on your handler. with a different set of items... (40320 permuts of "ABCDEFGH") Your handler will not test on the existence of an item. Rather it will generated an error and your handler will show the generic messagebox "an error occured in the listhandler" rather confusing.. Further in your handling code I found that your class appears to be handling MultiSelect boxes... And although multiselect is rather difficult to combine with typing, I thought I'd give it a try... and set the "handled" box to multiselectextended... which throws an error on each keypress. -- keepITcool | www.XLsupport.com | keepITcool chello nl | amsterdam Robin Hammond wrote in message : This one stemmed from frustration with trying to select items in a list of several thousand alphabetically sorted items. Unlike the Windows list handlers, Excel only reacts to a single key press. Pressing "A" then "B" in quick succession will move you to the first entry starting in "B", not to those starting "AB". So, rather than write custom code for each list with lots of entries, I created a class module that can be initialised for any list in a form. Multiple class objects can also be created and assigned to multiple lists. Usage is a doddle. All it needs is three lines of code. The class is available for anyone who wants to try it out on my site at the link below. http://www.enhanceddatasystems.com/E...istHandler.htm Please let me know if you find ways to improve on it. Robin Hammond www.enhanceddatasystems.com |
#6
Posted to microsoft.public.excel.programming
|
|||
|
|||
New offering: Class to handle multi key presses in sorted list
sent to your mail url on website
-- keepITcool | www.XLsupport.com | keepITcool chello nl | amsterdam Robin Hammond wrote in message : Could you email me the file. Thanks. Robin Hammond www.enhanceddatasystems.com |
#7
Posted to microsoft.public.excel.programming
|
|||
|
|||
New offering: Class to handle multi key presses in sorted list
Robin,
I'm sure I must be missing something but doesn't changing MatchEntry from fmMatchEntryFirstLetter to FmMatchEntryComplete achieve same, namely type "AB" and find the first item starting "AB", instead of "B". Regards, Peter "Robin Hammond" wrote in message ... This one stemmed from frustration with trying to select items in a list of several thousand alphabetically sorted items. Unlike the Windows list handlers, Excel only reacts to a single key press. Pressing "A" then "B" in quick succession will move you to the first entry starting in "B", not to those starting "AB". So, rather than write custom code for each list with lots of entries, I created a class module that can be initialised for any list in a form. Multiple class objects can also be created and assigned to multiple lists. Usage is a doddle. All it needs is three lines of code. The class is available for anyone who wants to try it out on my site at the link below. http://www.enhanceddatasystems.com/E...istHandler.htm Please let me know if you find ways to improve on it. Robin Hammond www.enhanceddatasystems.com |
#8
Posted to microsoft.public.excel.programming
|
|||
|
|||
New offering: Class to handle multi key presses in sorted list
Yes, in most cases. I think the reason I got off on this tangent was that I
was the built in method for a multi-select list box and matchentry doesn't seem to work. Since KeepItCool's comments I've gone back and tested again and the built in version works fine on a single select box. I think this one is going to go down in the obscure file pretty soon, but since I use a lot of multi-select lists it'll be useful to me anyway. Robin Hammond www.enhanceddatasystems.com "Peter T" <peter_t@discussions wrote in message ... Robin, I'm sure I must be missing something but doesn't changing MatchEntry from fmMatchEntryFirstLetter to FmMatchEntryComplete achieve same, namely type "AB" and find the first item starting "AB", instead of "B". Regards, Peter "Robin Hammond" wrote in message ... This one stemmed from frustration with trying to select items in a list of several thousand alphabetically sorted items. Unlike the Windows list handlers, Excel only reacts to a single key press. Pressing "A" then "B" in quick succession will move you to the first entry starting in "B", not to those starting "AB". So, rather than write custom code for each list with lots of entries, I created a class module that can be initialised for any list in a form. Multiple class objects can also be created and assigned to multiple lists. Usage is a doddle. All it needs is three lines of code. The class is available for anyone who wants to try it out on my site at the link below. http://www.enhanceddatasystems.com/E...istHandler.htm Please let me know if you find ways to improve on it. Robin Hammond www.enhanceddatasystems.com |
#9
Posted to microsoft.public.excel.programming
|
|||
|
|||
New offering: Class to handle multi key presses in sorted list
Thanks for the email. It was on overflow error on an integer data type that
has now been patched. Robin Hammond www.enhanceddatasystems.com "keepITcool" wrote in message ... sent to your mail url on website -- keepITcool | www.XLsupport.com | keepITcool chello nl | amsterdam Robin Hammond wrote in message : Could you email me the file. Thanks. Robin Hammond www.enhanceddatasystems.com |
#10
Posted to microsoft.public.excel.programming
|
|||
|
|||
New offering: Class to handle multi key presses in sorted list
Great! That is a nice utility.
with regards, J.V.Ravichandran - http://www.geocities.com/ jvravichandran - http://www.411asp.net/func/search? qry=Ravichandran+J.V.&cob=aspnetpro - http://www.southasianoutlook.com - http://www.MSDNAA.Net - http://www.csharphelp.com - http://www.poetry.com/Publications/ display.asp?ID=P3966388&BN=999&PN=2 - Or, just search on "J.V.Ravichandran" at http://www.Google.com *** Sent via Developersdex http://www.developersdex.com *** Don't just participate in USENET...get rewarded for it! |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
How to find a value with multi-column, multi-record list | Excel Worksheet Functions | |||
Sorted list | Excel Discussion (Misc queries) | |||
how to Pause a VBA procedure until user presses Enter | Excel Programming | |||
Utility offering - getting rid of or remapping redundant Styles | Excel Programming | |||
Extract values from a multi-select multi-column list-box | Excel Programming |