beginer in need of help

I'm using Visual Basic 6 and I'm try to make a program that makes a list of items and that check that all the items that are enter are unique. This is the code I'm writing can someone kindly point out my mistakes.

Option Explicit
Private Sub cmdEnter_Click()
    If txtItem.Text <> "" Then
        'If txtItems.Text = lstItems.List Then
            MsgBox "That's Already in the List", vbInformation, "Have tHat Already"
        End If
        With lstItems
            .AddItem txtItems.Text
        End With
    Else
        MsgBox "You Need To Enter A Item Name", vbExclamation, " Missing Info"
    End If
    txtItems.SetFocus
End Sub


Answer this question

beginer in need of help

  • JustinRC

    Here's one mistake:

    This is a VB.NET forum. Here's a good VB 6 forum:

    http://www.developerfusion.com/forums/forum-4

  • Eye5600

    I did not go through the code very thoroughly, but from the code snippet you have attached you have commented out the send if statement which could be your problem
  • beginer in need of help