Check the length of the posted field and then add as many characters as you want...
Example:
wantedlength=6
length=len(postedfield)
If length<wantedlength Then
' If IsNumeric(postedfield) Then
addstr=string(wantedlength-length, "0"
postedfield=addstr & postedfiel
' End If
End If
if the postedfield was 123 then the output would be 000123, I hope.
If (NOT fileSys.FolderExists(saveFolder)) Then
fileSys.CreateFolder saveFolder
End If
wantedlength=25
length=len(CCNumber)
If length<wantedlength Then
' If IsNumeric(CCNumber) Then
addstr=string(wantedlength-length, "0"
CCNumber= CCNumber & addstr
' End If
End If
Set textStr = fileSys.OpenTextFile(saveFolder+saveFile, 8, true)
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.