Right justify a string
"Claus Busch" wrote Hi Robert,
try:
s1 = "0000"
s2 = "13"
s2 = Format(CInt(s2), s1)
MsgBox s2
Hi Claus,
Thanks, that worked okay. But I overlooked a few situations.
Suppose that the s1 variable contains 4 space character (or ANY
characters, for that matter):
s1 = " " ' string with 4 spaces
s2 = "13"
Now, I would want s1 to look like:
s1 = " 13"
Do you have any ideas for this situation??
|