-
I have a function in my program that reads a string from a textbox and makes sure it only contains numbers with 2 decimal places. This works fine, until you put in a number into the textbox where the decimal places are zero's. ie VB converts "10.00" to "10". How can I get the string to include the zero's ?? Any suggestions.
-
Why not try:
Code:
Dim MyValue as Single
MyValue = CSng(Text1.Text)
This should work! :)
Oh yes. And remember to format. Without formatting, 10.00 would come out as 10.
Code:
' To go with top code
MyValue = Format(MyValue, "###,##0.00")
Hope this helps. :)
Edited by r0ach on 02-24-2000 at 07:46 AM