Doggie Posted April 11, 2003 Share 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 Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now