Doggie Posted April 11, 2003 Posted April 11, 2003 Requirements: Visual Basic(of course), Listbox control, textbox and command buttonListbox is where the item will go, Textbox is the item text and command button to add it to the listUnder the textboxes Change event addPrivate Sub textboxname_Change() If Text1.Text = "" Then Command1.Enabled = False Else Command1.Enabled = True End IfEnd SubIf Text1.Text = "" Then <== This is saying if theres no text in the textbox then it will make the command button disabledUnder the Command button Click eventPrivate Sub Command1_Click() List1.AddItem Text1.TextEnd Sub List1.AddItem Text1.Text <== Simply means add item to the list with the text in the textboxSimple
Recommended Posts
Please sign in to comment
You will be able to leave a comment after signing in
Sign In Now