Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How use Padding in VBA
Message
 
To
05/06/2003 12:34:31
General information
Forum:
Visual Basic
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00796797
Message ID:
00796815
Views:
10
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.com
Internet 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!
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform