Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Clear ListView Control Completely.

Status
Not open for further replies.

mobbarley

IS-IT--Management
Mar 4, 2004
22
0
0
AU
Hi guys,
In my program i have a sub which fills & formats a listbox exactly how I want.

This sub will be called by a timer.

Problem is when the sub is called more than once the listbox entries repeat. This is because im using listbox.add for each entry?

Because im lazy, is there an easy way to clear the listbox to default at the start of my sub so that it wont grow or error out when my code is executed for the n'th time?
 
answered my own question, dont know how i missed it.

frmMain.lstFiles.ListItems.Clear
frmMain.lstFiles.ColumnHeaders.Clear

I feel stupid :)
thanks.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top