hi everyone,
im having a problem with a procedure in a program im working on.the code looks like this:

Private Sub ShowDepSchedule(item As String, cost As Single, purchYear As Integer, numYears As Integer, depType As Single)

Dim depreciation As Single, straightLineDep As Single
Dim totalDeprec As Single, value As Single, yr As Integer

picOutput.Cls
picoutpur.Font = "courier new"
Call ShowHeading(item, cost, purchYear, numYears, depType)
Let value = cost
If depType = 1 Then Let straightLineDep = (1 / numYears) * value
Let totalDeprec = 0
For yr = 1 To numYears
If yr <> numYears Then
If depType = 1 Then
Let depreciation = straightLineDep
Else
Let depreciation = 2 / (numYears * value)
Else
Let depreciation = value
End If
Let totalDeprec = (totalDeprec + depreciation)
Call ShowYr(purchYear + yr - 1, value, depreciation, totalDeprec)
Let value = (value - depreciation)
Next yr


End Sub



anyways, i keep getting an else without if error. if anyone can help i would really appreciate it.
thanks, meth