Attempting to do an assignment that has five input boxes, and then uses them to calculate how much money a person would make over the course of their working life.
The problem is, when i run it, it simply gives me how much the person would make after 1 year, with a raise included. The raise is ment to be given every year.
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Dim Name As String
Dim Salary, Total, Raise As Double
Dim Age, Retire, Count As Integer
Name = TextBox1.Text
Age = TextBox2.Text
Salary = TextBox3.Text
Raise = TextBox4.Text / 100
Retire = TextBox5.Text
For Count = Age To Retire
Total = Total + Salary
Salary = Salary * Raise
Next
Label6.Text = Name & " will earn " & FormatCurrency(Total) & " before retiring. "
the for loop looks right to me, but i am very new to vb.