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 --------------------~-->
$9.95 domain names from Yahoo!. Register anything.
http://us.click.yahoo.com/J8kdrA/y20IAA/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/