Clearing a Listbox

Sumo

Member
Joined
Jun 14, 2005
Messages
10
Programming Experience
Beginner
I've got a listbox that is being populated from reading the contents of a directory. If the user changes the target directory the listbox obviously needs to change. I need to be able to clear out the previous contents of the listbox and cannot figure out the syntax.

I'm pretty sure I should be using listbox.objectscollection but again, cannot locate a sample.

Anyone have tutorials/samples to post? Thanks!
 
Of course I find it about twenty seconds after posting. Can we have a forum to go ask stupid questions that you know you're gonna find the answer as soon as you post??

Anyway for future generations the syntax is:

ListBox1.Items.Clear()

Ah well.
 
Back
Top