Format$ is returning blank strings
Hello!
I'm using format to format a number in exactly 15 characters but this is returning a blank string, does anyone have an idea why?
So far only text works eg. "ABC", not numbers.
This is just a reduced demonstration i typed right now:
_______________________________________________
Private Sub ApplyCaption()
Dim vSPC as string
vSPC = string(15," ")
lbldemo.caption = format$(str (VarInteger),vSPC)
End Sub
_________________________________________________
Thanks a lot, I'm almost finished my freeware game and this is really getting in the way!
Alex Pineda
-------------------------------------------------
Visit www.bluecatstudios.i-p.com
Re: Format$ is returning blank strings
Look up format in the help file i think you will find that when you set your format you need to use symbols instead of space characters
format(blah,"*****")
Re: Format$ is returning blank strings
Not sure how exactly you wanna format the number. But if you have 123 and you want the output to be 000000000000123, the code below should do it.
Format(CStr(IntVal), "000000000000000")
-Cool Bizs