Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
How use Padding in VBA
Message
 
À
05/06/2003 12:34:31
Information générale
Forum:
Visual Basic
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00796797
Message ID:
00796815
Vues:
9
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!
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform