I only have at most probably 1 thru 6 different leading numbers. I 
got it to work really well with making the custom listbox and having 
it do colors based on the prefix and having a ListBox variable that 
I could add the numbered items to and sort there then use a 
FindStringExact function to find the index for it in that variable 
listbox and then insert the item in that place in the visible 
listbox.

--- In [EMAIL PROTECTED], ".rEs" <[EMAIL PROTECTED]> wrote:
> Also, by padding with leading zeros, i mean that if you expect 
say, 1000
> items, then you'll need to pad with at least 3 zeros, and if you 
expect
> 100,000 then you'll need 5.  following that, you'll obviously need 
to use
> RTrim to trim the string of the unnecessary zeros.
> 
> for example:
> 
> 56-Sarah
> 651-Bob
> 1-Dave
> 74-Sarah
> 
> using a 3-zero example, they should be padded as:
> 
> 00056-Sarah
> 000651-Bob
> 0001-Dave
> 00074-Sarah
> 
> obviously they need to be trimmed to:
> 
> 056-Sarah
> 651-Bob
> 001-Dave
> 074-Sarah
> 
> or
> 
> 0056-Sarah
> 0651-Bob
> 0001-Dave
> 0074-Sarah
> 
> so, assuming you have them in a listbox already:
> 
> intTrimVal=4 '4 character pad
> for xx=0 to lstSource.listcount-1
>     lstSource.list(xx)=rtrim(lstSource.list(xx),intTrimVal)
> next xx
> 
> you could also pad the strings according to the longest-length 
string in
> your list, prior to padding.
> 
> hope this helps.
> 
> sorry it's so long-winded, I just wanted to clarify what I meant 
earlier.
> 
> thanks








------------------------ Yahoo! Groups Sponsor --------------------~--> 
Make a clean sweep of pop-up ads. Yahoo! Companion Toolbar.
Now with Pop-Up Blocker. Get it for free!
http://us.click.yahoo.com/L5YrjA/eSIIAA/yQLSAA/k7folB/TM
--------------------------------------------------------------------~-> 


'// =======================================================
    Rules : http://ReliableAnswers.com/List/Rules.asp
    Home  : http://groups.yahoo.com/group/vbHelp/
    =======================================================
    Post  : [EMAIL PROTECTED]
    Join  : [EMAIL PROTECTED]
    Leave : [EMAIL PROTECTED]
'// =======================================================
 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/vbhelp/

<*> To unsubscribe from this group, send an email to:
    [EMAIL PROTECTED]

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/
 



Reply via email to