Results 1 to 5 of 5

Thread: Stupid Question

  1. #1

    Thread Starter
    Hyperactive Member
    Join Date
    Oct 2000
    Posts
    400

    Unhappy

    How do I clear a ListView?

  2. #2
    Retired VBF Adm1nistrator plenderj's Avatar
    Join Date
    Jan 2001
    Location
    Dublin, Ireland
    Posts
    10,359
    ListView1.ListItems.Clear ?
    Microsoft MVP : Visual Developer - Visual Basic [2004-2005]

  3. #3
    Evil Genius alex_read's Avatar
    Join Date
    May 2000
    Location
    Espoo, Finland
    Posts
    5,538
    There are no stupid questions, only stupid answers - so here's one for you from MSDN (listview scenario 3 in the help file) :
    GetTitles Procedure: Clear the ListItems collection with the Clear method
    Each time you invoke the GetTitles procedure, you will query the Biblio.mdb database to create a new collection of ListItem objects. The first thing to do, however, is to clear the old collection with the Clear method:

    lvwDB.ListItems.Clear ' Clears all ListItems.

    Please rate this post if it was useful for you!
    Please try to search before creating a new post,
    Please format code using [ code ][ /code ], and
    Post sample code, error details & problem details

  4. #4

    Thread Starter
    Hyperactive Member
    Join Date
    Oct 2000
    Posts
    400

    Smile

    Thanks guys. Gotta love the 6 minute turnaround on VB-World.

  5. #5
    Retired VBF Adm1nistrator plenderj's Avatar
    Join Date
    Jan 2001
    Location
    Dublin, Ireland
    Posts
    10,359
    5 minutes here
    Microsoft MVP : Visual Developer - Visual Basic [2004-2005]

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width