|
-
Feb 15th, 2009, 09:23 PM
#1
Thread Starter
New Member
[RESOLVED] Show positive symbol for integer
Hey all,
One quick question.
How do I have a positive number show the "+" sign before the number.
I feel that this should be easy but my searches must be too broad because I get way more info than I want and don't seem to find the easy fix.
Thanks in advance,
Major
-
Feb 15th, 2009, 09:26 PM
#2
Re: Show positive symbol for integer
If you want a "+" symbol before a number you prepend one yourself when you convert the number to a string. There's nothing that will do it for you automatically (that I've ever seen) because positive numbers are implied, in VB just as in the rest of the world.
-
Feb 15th, 2009, 09:26 PM
#3
Re: Show positive symbol for integer
There isn't an easy fix, because the only way to show that would be to add it. Assuming you have the number showing up as a string already, you need to do something like this:
<wherever you are putting it> = "+" & <Number>.ToString
It can't be done automatically.
My usual boring signature: Nothing
 
-
Feb 15th, 2009, 09:51 PM
#4
Thread Starter
New Member
Re: Show positive symbol for integer
I was afraid of that.
I kind of hoped there was a Format function that would accomplish this as some numbers will be negative and some positive.
Thanks for your help, I'll set this as resolved.
Major
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
|