smccrary123 0 Newbie Poster

Hi I'm new to VB and was working on a small app that needs to populat or update a checked listbox. I have the code written it copiles without error. No syntax errors. But it does not execute the way expected. So there is probably some simple logic error that I am missing. Once th update button is chosen the user should be able to add to the items hit update and the checked list box be refreshed. Any help will be greatly appreciated.

Thanks

Public Class FrmThird
    'Dim SecondForm As New frmSecond
    'Dim ThirdForm3 As New FrmThird
    Private Sub Label1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Label1.Click

    End Sub

    Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
        If TextBox1.Text <> "" Then
            If frmSecond.CheckedListBox1.CheckedItems.Contains(TextBox1.Text) = True Then
                frmSecond.CheckedListBox1.Items.Add(CType(TextBox1.Text, String), CheckState.Checked)
            End If

        End If
        'TextBox1.Text = ""
        'End If
    End Sub 'button1_Click

    'End Sub

    Private Sub FrmThird_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load

    End Sub

    'Private Sub TextBox1_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles TextBox1.TextChanged

    'End Sub
End Class
Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.