Hi I have a numeric up down, and I want it to either add or minus one depending if the up or down arrow is pressed. I have the code below but it only works to minus one from the varible?
Private Sub NumericUpDown1_ValueChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles NumericUpDown1.ValueChanged
If ComboBox1.SelectedIndex = 0 Then
seatsA = seatsA - 1
TextBox2.Text = seatsA
ElseIf ComboBox1.SelectedIndex = 1 Then
seatsB = seatsB - 1
TextBox2.Text = seatsB
ElseIf ComboBox1.SelectedIndex = 2 Then
seatsC = seatsC - 1
TextBox2.Text = seatsC
End If
End Sub
Edit: If the numeric updown value is changed, the varible stores this change, each comboBox has its own varible as it needs to store the value for each. I.e if seatsA is 20, when the user goes back to selcted index one 20 is shown.
Seats start with a number...such as 75, when the numeric updown is increased, one is taken off the seats value for each seat (a,b,c)
Thanks