|
-
May 18th, 2001, 03:45 PM
#1
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
-
May 18th, 2001, 03:48 PM
#2
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,"*****")
-
May 19th, 2001, 10:25 AM
#3
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
Good Luck,
-Cool Bizs
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|