|
-
Feb 16th, 2007, 12:51 AM
#1
Thread Starter
Junior Member
Hellp
I keep getting an error messege that says :
Conversion from string "" to type "integer" is not valid?!?!!?
what should i do?? what am i doing wrong?
Public Class Form1
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles calculate.Click
Dim thenumber, theterms, z As Integer
Dim thesum As Decimal
thenumber = CInt(number.Text)
theterms = CInt(terms.Text)
thesum = CDec(sum.Text)
theterms = 1
thesum = 0
Do Until thesum > thenumber
z = 1 / theterms
thesum = z
Exit Do
z = z + z
theterms = theterms + 1
Loop
terms.Text = CStr(theterms)
sum.Text = CStr(thesum)
End Sub
End Class
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
|