Upon checking the corresponding check box, which is either Ladies Shoes, Men Shoes, Sneakers or Sandals, the program needs fill the listbox with the checkbox information. Can't figure the syntax, any help would be greatly appreciated.
Public Class Form1
Private Sub chkboxLadiesShoes_CheckedChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles chkboxLadiesShoes.CheckedChanged
Dim ladiesShoes As String = "Ladies Shoes"
If chkboxLadiesShoes.CheckState = 1 Then
lstDisplay.Text = ladiesShoes
ElseIf chkboxLadiesShoes.CheckState = 2 Then
lstDisplay.Items.Clear()
End If
End Sub
Private Sub chkboxMenShoes_CheckedChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles chkboxMenShoes.CheckedChanged
Dim menShoes As String = "Men Shoes"
If chkboxMenShoes.CheckState = 1 Then
lstDisplay.Text = menShoes
ElseIf chkboxMenShoes.CheckState = 2 Then
lstDisplay.Items.Clear()
End If
End Sub
Private Sub chkSneakers_CheckedChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles chkboxSneakers.CheckedChanged
Dim sneakers As String = "Sneakers"
If chkboxSneakers.CheckState = 1 Then
lstDisplay.Text = sneakers
ElseIf chkboxSneakers.CheckState = 2 Then
lstDisplay.Items.Clear()
End If
End Sub
Private Sub chkSandals_CheckedChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles chkboxSandals.CheckedChanged
Dim Sandals As String = "Sandals"
If chkboxSandals.CheckState = 1 Then
lstDisplay.Text = Sandals
ElseIf chkboxSandals.CheckState = 2 Then
lstDisplay.Items.Clear()
End If
End Sub
Private Sub btnExit_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnExit.Click
Me.Close()
End Sub
End Class