In my app, I am converting text to doubles. It continues to drop the trailing zeros and the decimal on numbers.
.5 works fine
22.3125 works fine
0.0 does not work. it drops the "." and returns a blank value, or no value
1.0 drops the "." and the trailing zero
I have included the sample code I have been using to test different theories. I don't think using text boxes is the problem because I am having the same exact issues in my real code.
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Dim MyNumber As Double
MyNumber = TextBox1.Text
TextBox2.Text = Format(MyNumber, "#.####")
End Sub
This will not work for me. Any help, thanks in advance.
!--removed tag-->
Enter your message below
Sign in or Join us (it's free).