In microsoft.public.scripting.vbscript message <e5UZcbUCJHA.2480@xxxxxx
NGP02.phx.gbl>, Thu, 28 Aug 2008 14:47:06, "Richard Mueller [MVP]"
<rlmueller-nospam@xxxxxx> posted:
>
>Shouldn't it be:
>
>sGroup = "[Group X]-" & Right("0000" & iNumber, 4)
>
>This should work for iNumber from 0 to 9999. Re "shouldn't" : not necessarily. An alternative is
sGroup = "[Group X]-" & Right(10000 + iNumber, 4)
which is one character shorter and might be marginally faster
--
(c) John Stockton, nr London, UK. ?@merlyn.demon.co.uk Turnpike v6.05 MIME.
Web <URL:http://www.merlyn.demon.co.uk/> - FAQish topics, acronyms, & links.
Proper <= 4-line sig. separator as above, a line exactly "-- " (SonOfRFC1036)
Do not Mail News to me. Before a reply, quote with ">" or "> " (SonOfRFC1036)