VB.NET Question and Recomendation
Hi. I a begginer using VB.NET. Im making a project which is a change calculator (money).
I have two TextBoxes were in one I put the purchase price and in the other the amount tendered. The format to enter it is like this string : 1852 (knowing that i mean $18.52)
The problem is what can I use to take that string of numbers and display in my LISTBOX (lstresults) in the format of money, in order that I can put any amount of number (money) and it will know were to put the decimal point "."
to divide the cents with the dollars.
Purchase Price: 1852 (format entered in the TextBox)
| Purchase price is: $18.52
| Amount Tendered: .......
Dim PurchasePrice As String = "1852"
lstResults.Items.Add("Purchase price is: " & Format(Val(PurchasePrice) / 100, "Currency"))
To understand how that works, look up the Val and Format functions in VB's online help.
Please post questions to the forums, where others may benefit.
I do not offer free assistance by e-mail. Thank you!
Thanks a lot. It work perfect.
Im looking forward to read more about Val and Format functions
-- Android Development Center
-- Cloud Development Project Center
-- HTML5 Development Center
-- Windows Mobile Development Center