I have a text box to where a user will insert text like 1234567. My intentions is to have that textbox add the comma's and decimal points once the focus has left it. However the results I am getting is 1,234,567.00 and not 12,345.67.
Here is my code:
Private Sub toothchart_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles toothchart.LostFocus
Dim v4 As Integer
v4 = toothchart.Text
If v4 > 999
Then toothchart.Text = v4.ToString("N2")
Free Guide: Managing storage for virtual environments
Complete a brief survey to get a complimentary 70-page whitepaper featuring the best methods and solutions for your virtual environment, as well as hypervisor-specific management advice from TechTarget experts. Don’t miss out on this exclusive content!