+ Reply to Thread
Results 1 to 4 of 4

Delete rows from Listbox

  1. #1
    Registered User
    Join Date
    10-09-2017
    Location
    Stavanger, Norway
    MS-Off Ver
    O365
    Posts
    78

    Delete rows from Listbox

    I have a UserForm with a ListBox. I also have a Command Button to delete rows from the ListBox. (Code Below), due to the way I've constructed the ListBox it MUST contain at least one row. I'd like to include code in the DELETE command that return a Message stopping the delete if there is only one row in the Listbox .. any suggestions.
    Please Login or Register  to view this content.

  2. #2
    Forum Expert BadlySpelledBuoy's Avatar
    Join Date
    06-14-2013
    Location
    East Sussex, UK
    MS-Off Ver
    365
    Posts
    7,903

    Re: Delete rows from Listbox

    Difficult to say for sure without sight of a sample file for context, but perhaps this?
    Please Login or Register  to view this content.
    BSB

  3. #3
    Registered User
    Join Date
    10-09-2017
    Location
    Stavanger, Norway
    MS-Off Ver
    O365
    Posts
    78

    Re: Delete rows from Listbox

    BadlySpelledBuoy... Many thanks that worked fine

  4. #4
    Forum Expert BadlySpelledBuoy's Avatar
    Join Date
    06-14-2013
    Location
    East Sussex, UK
    MS-Off Ver
    365
    Posts
    7,903

    Re: Delete rows from Listbox

    Glad I could help

    BSB

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Delete the rows of listbox
    By supmk in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 04-17-2021, 05:11 AM
  2. Showing rows in listbox that are older than 2 months based and delete
    By sniper1 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 04-25-2020, 04:55 AM
  3. ListBox delete selected if not then message: Please select something from listbox
    By KrisLaw in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 12-19-2019, 06:28 AM
  4. [SOLVED] delete rows of selected items on listbox
    By 9599lorenzo in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 04-30-2015, 01:57 PM
  5. Delete rows that do not match items from listbox
    By pietras152 in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 10-12-2013, 01:08 PM
  6. Read text file to ListBox and Delete rows in ListBox and re-write text file
    By Nu2Java in forum Excel Programming / VBA / Macros
    Replies: 14
    Last Post: 10-29-2012, 09:42 AM
  7. Delete Autofiltered rows from multi-column Listbox
    By kriswhiteley in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 04-03-2012, 08:46 AM

Tags for this Thread

Bookmarks

Posting Permissions

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

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1