Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

currency format 2

Status
Not open for further replies.

bjarvis

Technical User
Jan 15, 2001
38
US
I am trying to make the format in text1 currency. Here's my code any help would be appreciated.

Private Sub Command1_Click()
On Error Resume Next
Dim AnhCost As Currency, AnhRate As Integer
AnhCost = InputBox$("Enter the cost of ahydrous.", "Anhydrous Cost")
AnhRate = InputBox$("Enter the rate of anhydrous per acre.")
Text1.Text = (AnhRate \ 0.82) * AnhCost
End Sub
 
Try this

Private Sub Command1_Click()
On Error Resume Next
Dim AnhCost As Currency, AnhRate As Integer
AnhCost = InputBox$("Enter the cost of ahydrous.", "Anhydrous Cost")
AnhRate = InputBox$("Enter the rate of anhydrous per acre.")
Text1.Text = format((AnhRate \ 0.82) * AnhCost,"Currency")
End Sub


Pete
_____________
Real programs don't eat cache


 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top