I'd like to know if there is such a thing as a standard function for (left or right) padding a string with blanks (or any other character). Just couldn't find it on the vb help.
Printable View
I'd like to know if there is such a thing as a standard function for (left or right) padding a string with blanks (or any other character). Just couldn't find it on the vb help.
i'm not sure what you meant?
Code:lset yourstring=string(10," ")
yourstring=left(yourstring,len(yourstring)-10) & string(10," ")
'or
yourstring=yourstring & string(10," ")
yourstring=string(10," ")+yourstring
Or You could try to use the VB function Space()...
Dim MyString
' Returns a string with 10 spaces.
MyString = Space(10)