i changed it around a little bit, but same problem...i get that messege



Public Class Form1

Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles calculate.Click

Dim thenumber As Integer
Dim theterms As Integer
Dim z As Integer
Dim n As Integer
Dim thesum As Decimal


thenumber = CInt(number.Text)
theterms = CInt(terms.Text)
thesum = CDec(sum.Text)

theterms = 1
thesum = 0
z = 1 / n
n = 1



Do While thesum < thenumber
thesum = z
z = z + z
n = n + 1

Loop



terms.Text = CStr(theterms)
sum.Text = CStr(thesum)