How to Clear Listbox


Clearing a list box is an action often associated with computer programming and specifically programming involving the Visual Basic programming language. Visual Basic was developed by Microsoft in the 1990s. It is a relatively easy programming language to learn, and is popular with beginning computer programmers. Clearing a listbox using Visual Basic is easy, and requires only minor knowledge of the language. There may be slight differences in the applications of this task due to changes in the language with the 1998 Visual Basic Net update. Be sure you know which version of Visual Basic was used to create the listbox as this will tell you what command you need to use in order to clear it.

  • Determine if the list box was created using Visual Basic or Visual Basic Net. If you do not know which version created the list box, then you will have to play around with commands until you find the correct one.

  • Open the Visual Basic software and locate the list box you want to clear.

  • Type "ListBox1.Items.Clear()" into the insert code box in Visual Basic Net. If you are using the regular version of Visual Basic, type "ListBox1.Clear" into the insert code box.

  • Save the application you are creating and restart the Visual Basic software. The listbox should now be clear.

Tips & Warnings

  • Make sure you know which version of Visual Basic you are using as this will affect how codes will work.

Related Searches


  • Photo Credit Creatas Images/Creatas/Getty Images
Promoted By Zergnet


You May Also Like

Related Searches

Check It Out

Geek Vs Geek: Robot battles, hoverboard drag race, and more

Is DIY in your DNA? Become part of our maker community.
Submit Your Work!