You should use arrays of controls (e.g.
txts(5)
instead of
txt5s
) and arithmetic relations, in order to reduce
all the
Case
stuff to
If cur_years < 10 Then
txt_new_years.Text = cur_years + 1
txt_new_salary.Text = Val(txts(cur_degree).Text) + Val(txtinc(cur_degree).Text) * cur_years
ElseIf cur_years = 10 Then
txt_new_years.Text = 0
txt_new_degree.Text = cur_degree + 1
txt_new_salary.Text = Val(txts(cur_degree + 1).Text)
Else
End