|
-
Apr 28th, 2001, 04:27 PM
#1
Thread Starter
Junior Member
changing text to currency
Hi,
I have a calculator function in my program. Users of my software have been complaining because the dollar amount is hard to read especially when they get into high numbers.
ex.
$6426587895.00 is 6 billion, 426 million, ect....
but it's kind of hard to tell without counting spaces
I would like it to come out
$6,426,587,895.00
if the number was
$6420
I want it to come out $6,420.00
How would I format a string to do this?
-
Apr 28th, 2001, 04:38 PM
#2
Hyperactive Member
Try this:
Code:
Private Sub Form_Load()
Dim strInput As String
Text1.Text = strInput
Format strInput, ("Currency")
Label1.Caption = strInput
End Sub
This wont work on VB7
Lee
 Mahalo 
VB6(SP5), VC++, COBOL, Basic, JAVA
MBA, MCSD, MCSE, A+
Computer Forensics
-
Apr 28th, 2001, 04:39 PM
#3
Use the FormatCurrency function.
Code:
MsgBox FormatCurrency("$6420", 2)
-
Apr 28th, 2001, 06:40 PM
#4
Or the Format function.
Code:
MsgBox Format("$6420", "$0.00")
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
|