Public Class appointmentApplicationForm Private trainingCounter() As Integer = {0, 0, 0, 0} Private specialistCounter() As Integer = {0, 0, 0} 'Private trainingCount(4) As Integer 'Private Sub settrainingcount() ' Dim index As Integer ' For index = 0 To 3 ' trainingCount(index) = 0 ' Next 'End Sub Private Sub exitButton_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles exitButton.Click Me.Close() End Sub Private Sub eventConfirmationButton_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles eventConfirmationButton.Click If CheckBox5.Checked = True And ComboBox2.SelectedIndex = 1 Then MsgBox("Mike Borowski cannot perform salary review!") End If If CheckBox2.Checked = False Then MsgBox("You must include a DVD/VHS player in your training session!") Else specialistCounter(ComboBox2.SelectedIndex) += 1 'if training session chosen then trainingCounter(ComboBox1.SelectedIndex) += 1 If trainingCounter(ComboBox1.SelectedIndex) <= 2 Then eventConfirmationForm.Show() eventConfirmationForm.Label1.Text = ComboBox1.SelectedItem + vbNewLine + DateTimePicker1.Text + vbNewLine + locationTextBox.Text + vbNewLine + ComboBox2.SelectedItem + vbNewLine If CheckBox1.Checked = True Then eventConfirmationForm.Label2.Text = "Tape Recorder" End If If CheckBox2.Checked = True Then eventConfirmationForm.Label3.Text = "DVD/VHS Player" End If If CheckBox3.Checked = True Then eventConfirmationForm.Label4.Text = "Laptop" End If If CheckBox4.Checked = True Then eventConfirmationForm.Label5.Text = "Overhead Projector" End If ''include counters, increment appointment counter for chosen employee by 1 appointmentCounter(ComboBox1.SelectedIndex) += 1 Else MessageBox.Show("the number of training sessions exceeds two") End If End If End Sub Private Sub DateTimePicker1_ValueChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles DateTimePicker1.ValueChanged End Sub Private Sub appointmentApplicationForm_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load End Sub Private Sub CheckBox2_CheckedChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles CheckBox2.CheckedChanged End Sub Private Sub appointmentsButton_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles appointmentsButton.Click appointmentsForm.Show() End Sub End Class