I am writing a program to calculate a tax rate based on a few simple income levels, but I am getting bogged down with the End of Statement error. I have tried numerous endings except the obvious am sure. Can anyone offer some suggestions? Here is what I have so far!
Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Dim TaxableIncome As Double
Dim Condition1 As Double
Dim Condition2 As Double
Dim Condition3 As Double
Dim TaxDue As Double
CInt(TaxableIncome) TaxDue =
CInt(TaxableIncome) Condition1 = TaxableIncome <= 20000
' Condition 1 calculates the taxable income if less than 20000'
Condition2 = TaxableIncome <= 50000
'Condition 2 Calculates taxable income if less than 50000'
Condition3 = TaxableIncome > 50000
' Condition 3 calculates taxable income if greater than 50000'
If Condition1 the statements executed if condition1 is True
ElseIf TaxableIncome <= 20000 Then TaxDue = TaxableIncome * 0.02
ElseIf condition2 Then statements executed if condition2 is True
ElseIf (TaxableIncome <= 50000) Then TaxDue = 400 + .025*(TaxableIncome-20000)
ElseIf Condition3 then statements executed if condition 2 is false
ElseIf(TaxableIncome > 50000) Then TaxDue = 1150 + .035*(TaxableIncome-50000)
ElseIf (TaxableIncome) Then
CInt(TaxableIncome) & "Total Taxes Due" & TaxDue
Visual Basics 2008
August 15, 2009 2:00 AM
August 17, 2009 3:45 PM