[COLOR=blue]Dim [/COLOR]amount [COLOR=blue]as[/COLOR] [COLOR=blue]Decimal[/COLOR] = [COLOR=blue]CType[/COLOR](TextBox1.Text, [COLOR=blue]Decimal[/COLOR]) [COLOR=green]'say you have entered 1400.10345[/COLOR][SIZE=2][COLOR=#0000ff]
Me[/COLOR][/SIZE][SIZE=2].TextBox1.Text = [/SIZE][SIZE=2][COLOR=#0000ff]String[/COLOR][/SIZE][SIZE=2].Format("{0:n2}", amount) [COLOR=green]'the result after formating will look like 1,400.10[/COLOR][/SIZE]
[SIZE=2][COLOR=#0000ff]Dim[/COLOR][/SIZE][SIZE=2] nfi [/SIZE][SIZE=2][COLOR=#0000ff]As[/COLOR][/SIZE][SIZE=2] NumberFormatInfo = [/SIZE][SIZE=2][COLOR=#0000ff]New[/COLOR][/SIZE][SIZE=2] CultureInfo("en-US", [/SIZE][SIZE=2][COLOR=#0000ff]False[/COLOR][/SIZE][SIZE=2]).NumberFormat
[/SIZE][SIZE=2][COLOR=#0000ff]Dim[/COLOR][/SIZE][SIZE=2] num [/SIZE][SIZE=2][COLOR=#0000ff]As[/COLOR][/SIZE][SIZE=2] [/SIZE][SIZE=2][COLOR=#0000ff]Decimal[/COLOR][/SIZE][SIZE=2] = [/SIZE][SIZE=2][COLOR=#0000ff]Decimal[/COLOR][/SIZE][SIZE=2].Parse("1542.00000".Replace(".", NumberFormatInfo.CurrentInfo.NumberDecimalSeparator))
MsgBox(num.ToString("C", nfi))
[/SIZE]