This should work:
function LPad(sInput,iNumChars,sPadChar)
dim iX
iX = iNumChars - len(sInput)
sInput = String(sPadChar,iNumchars) & sInput
LPad = sInput
end function
I beleive VBA supports the string function. If not, then just use a for loop with IX to add the characters. Pretty simple.
Brian Seekford
Seekford Solutions, Inc.http://www.SeekfordSolutions.comInternet ActiveX Controls and .NET Class Libraries.
SMTP/S FTP POP3/S HTTP/S SNTP MIME PING WHOIS TRACEROUTE NNTP DNS MX
Base64, UUEncode, yEnc, MD5, SHA1, URL, Quoted-Printable.
Resizer and Tooltips
Email Verification and more. Check us out!