Re: Olaf Schmidt - sort routine
- From: "MP" <Nospam@xxxxxxxxxx>
- Date: Fri, 6 Apr 2007 14:16:52 -0500
"Steve Gerrard" <mynamehere@xxxxxxxxxxx> wrote in message
news:w-CdnXuSB-uoLIjbnZ2dnUVZ_qyjnZ2d@xxxxxxxxxxxxxx
"MP" <NoSpam@xxxxxxxxxx> wrote in message
news:OYhD%23i8dHHA.5056@xxxxxxxxxxxxxxxxxxxxxxx
I pasted the following code into an empty class module and named it
cSortStrings.
I bet you didn't try more than 555 strings, because K(0).Items willreturn only
the first 555 (MaxSubItems). Your SortedList property won't work reliably.of
The array inside the class is usually going to be bigger than the number
items, so use the Count property to tell you how many slots are actuallyfilled.
The simplest approach would be to try
For i = 0 to cSort.Count
ListBox1.AddItem cSort.Item$(i)
Next i
Thanks Steve,
Right, I have actually a very small set of strings in the app I'm using this
in now.(very simple in-house utility)
I'm such an idiot, I saw the item and count properties and was just too
stupid to see the obvious simple way you show above.
Thanks
Mark
.
- References:
- Olaf Schmidt - sort routine
- From: MP
- Re: Olaf Schmidt - sort routine
- From: Steve Gerrard
- Olaf Schmidt - sort routine
- Prev by Date: Re: Looking for "windows ce toolkit for Visual Basic 6.0"
- Next by Date: Re: Olaf Schmidt - sort routine
- Previous by thread: Re: Olaf Schmidt - sort routine
- Next by thread: Re: Olaf Schmidt - sort routine
- Index(es):
Relevant Pages
|