|
-
Jun 3rd, 2009, 04:54 PM
#1
Thread Starter
Member
[RESOLVED] How to convert 1 to "One", 2 to "Two", etc
I have an integer value that needs to be displayed in an error message. Not a big deal, but would love to have "eight" in the message and not 8. Is there a built in function to convert integer values to their string representation?
-
Jun 3rd, 2009, 05:01 PM
#2
Fanatic Member
Re: How to convert 1 to "One", 2 to "Two", etc
It's in VB, but I am sure you can convert to VB.Net
http://www.ozgrid.com/VBA/ValueToWords.htm
-
Jun 3rd, 2009, 05:02 PM
#3
Re: How to convert 1 to "One", 2 to "Two", etc
No however google it and someones probably written a function for it. You could also easily write your own, depending on how high the number could be.
-
Jun 3rd, 2009, 05:03 PM
#4
Re: How to convert 1 to "One", 2 to "Two", etc
 Originally Posted by BillBoeBaggins
VB is VB.Net. VB 6 is not.
-
Jun 3rd, 2009, 05:05 PM
#5
Fanatic Member
Re: How to convert 1 to "One", 2 to "Two", etc
VB is VB.Net. VB 6 is not.
Your point?
-
Jun 3rd, 2009, 05:10 PM
#6
Re: How to convert 1 to "One", 2 to "Two", etc
You said he may have to convert it to VB.Net, I'm letting him no that no conversion is necessary because they are the same thing.
-
Jun 3rd, 2009, 05:43 PM
#7
Re: How to convert 1 to "One", 2 to "Two", etc
this might give you a head start if you're writing your own function.
Currency to Words
- Coding Examples:
- Features:
- Online Games:
- Compiled Games:
-
Jun 3rd, 2009, 05:49 PM
#8
Re: How to convert 1 to "One", 2 to "Two", etc
 Originally Posted by Vectris
VB is VB.Net. VB 6 is not.
looks to me like its VBA, which isnot VB.Net
- Coding Examples:
- Features:
- Online Games:
- Compiled Games:
-
Jun 3rd, 2009, 06:17 PM
#9
Addicted Member
Re: How to convert 1 to "One", 2 to "Two", etc
PC #1: Athlon64 X2+Vista64+VS2008EE+.NET3.5 #2: XP (all flavours Ghost'd)+VS2008EE+.NET3.5
Help Files: HelpMaker · Dr. Explain · Create Icons: IcoFX
"Whoever eats my flesh and drinks my blood has eternal life, and I will raise him on the last day." John 6:54
-
Jun 3rd, 2009, 06:31 PM
#10
Re: How to convert 1 to "One", 2 to "Two", etc
 Originally Posted by JugglingReferee
that only does 1 trillion - 1
- Coding Examples:
- Features:
- Online Games:
- Compiled Games:
-
Jun 3rd, 2009, 06:48 PM
#11
Addicted Member
Re: How to convert 1 to "One", 2 to "Two", etc
 Originally Posted by .paul.
that only does 1 trillion - 1 
So then we can't convert the US national debt using this class.
PC #1: Athlon64 X2+Vista64+VS2008EE+.NET3.5 #2: XP (all flavours Ghost'd)+VS2008EE+.NET3.5
Help Files: HelpMaker · Dr. Explain · Create Icons: IcoFX
"Whoever eats my flesh and drinks my blood has eternal life, and I will raise him on the last day." John 6:54
-
Jun 3rd, 2009, 06:51 PM
#12
Fanatic Member
Re: How to convert 1 to "One", 2 to "Two", etc
Divide the number a few Times: One Trillion, One Trillion, One Trillion.. etc heh.
-
Jun 5th, 2009, 09:35 PM
#13
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
|