Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 575
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,253
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 575
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,253
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 575
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,253
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,600
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 575
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 575
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4
Default 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
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
How to find a value with multi-column, multi-record list Dallasm Excel Worksheet Functions 1 May 30th 10 05:40 PM
Sorted list G Chartrand Excel Discussion (Misc queries) 2 April 28th 06 05:07 PM
how to Pause a VBA procedure until user presses Enter Paul James[_6_] Excel Programming 15 June 10th 04 12:55 AM
Utility offering - getting rid of or remapping redundant Styles Robin Hammond[_2_] Excel Programming 1 March 3rd 04 06:37 PM
Extract values from a multi-select multi-column list-box Peter[_20_] Excel Programming 5 September 28th 03 04:04 PM


All times are GMT +1. The time now is 03:04 PM.

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"