Thursday, October 28, 2010

How do I format a number in a textbox in VB?

I need to format the numbers that appear in a textbox into the format 000.00



Any ideas on how to do this and a sample would be greatly appreciated.



Note; I'm using VB 2005.



Thanks!How do I format a number in a textbox in VB?
Dim strBox As String = TextBox1.Text.Trim

Dim douNum As Double = Convert.ToDouble(strBox)

MsgBox(douNum.ToString(';###.##';))



There's more but this should get you started

No comments:

Post a Comment