|
-
Dec 27th, 2008, 03:01 PM
#1
Thread Starter
Junior Member
Need help pls 'fraction division in VB 2005
Hello,,,,,,,,,,,,,,,
Would some1 please help me to let the below code work for proper fractions( positive numbers less than 1)
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Dim D1, D2 As Integer
D1 = CInt(TextBox1.Text)
D2 = CInt(TextBox2.Text)
TextBox3.Text = D2 / D1
End Sub
End Class
If I put 0.1 in textbox2 and 0.3 in textbox1 the results in textbox3 is NaN ??!!!
Cheers
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|