glennston
asked on
Rounding
Hello,
Can you please tell me how I can round the numeric contents of a text box to two decimal places? I presume I would first need to convert the contents of the text box into a double variable...
Thanks in advance for your reply,
Glenn Houston.
Can you please tell me how I can round the numeric contents of a text box to two decimal places? I presume I would first need to convert the contents of the text box into a double variable...
Thanks in advance for your reply,
Glenn Houston.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
CDbl(Fix(text1.text, 2))
Or with your textbox:
Private Sub Command1_Click()
MsgBox FormatNumber(Text1.Text, 2)
End Sub
S
Private Sub Command1_Click()
MsgBox FormatNumber(Text1.Text, 2)
End Sub
S
Private Sub Command1_Click()
MsgBox Format(Text1.Text, "0.00")
End Sub
could always do that too =\
MsgBox Format(Text1.Text, "0.00")
End Sub
could always do that too =\
Well, give someone the points?