Jump to content
xisto Community
Sign in to follow this  
ORION

Removing Items From Listboxes without entering the name manualy

Recommended Posts

so i have code set up to add items to the list box. i want to be able to remove the item by clicking on it and highlight it then click another button to remove the item from the listbox. i no u can set up another textbox and enter the name manualy and remove it that way butthats no good. So could sum1 clue me in on this thaanks alot

Share this post


Link to post
Share on other sites

It's fairly simple to do that, just use RemoveItem property.

Just add another command button, and enter the following code in Click event, changing the name of List1 to whatever your listbox is named.

Sub Command1_Click()List1.RemoveItem List1.ListIndexEnd Sub

This code should do it :angry:

Share this post


Link to post
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×
×
  • Create New...

Important Information

Terms of Use | Privacy Policy | Guidelines | We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.