I am having trouble getting the counts store the value from one button click to another. The formula works as far as calculating the salary and the commission and on each button click it adds one to the proper section of array but when i press the button again the count from the previous click goes away and the count shows up in the salary count that matches the most current info put in the textbox. I have tried declaring the array outside the sub under the public class. I have also tried putting the counter into a separate function. Any help would be appreciated. Here is the code I have written so far.
Public class form1
Private Sub btnSubmit_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnSubmit.Click
Dim sales, salary, commission As Double
sales = salestxt.Text
commission = sales * 0.09
salary = commission + 200
lbSalary.Text = salary
Dim s(8)
s(0) = 0
s(1) = 0
s(2) = 0
s(3) = 0
s(4) = 0
s(5) = 0
s(6) = 0
s(7) = 0
s(8) = 0
Select Case salary
Case 200 To 299
s(0) = s(0) + 1
Case 300 To 399
s(1) = s(1) + 1
Case 400 To 499
s(2) = s(2) + 1
Case 500 To 599
s(3) = s(3) + 1
Case 600 To 699
s(4) = s(4) + 1
Case 700 To 799
s(5) = s(5) + 1
Case 800 To 899
s(6) = s(6) + 1
Case 900 To 999
s(7) = s(7) + 1
Case Is >= 1000
s(8) = s(8) + 1
End Select
lb1.Text = s(0)
lb2.Text = s(1)
lb3.Text = s(2)
lb4.Text = s(3)
lb5.Text = s(4)
lb6.Text = s(5)
lb7.Text = s(6)
lb8.Text = s(7)
lb9.Text = s(8)
End Sub
End Class