+ Reply to Thread
Results 1 to 3 of 3

VBA to remove item selected from ListBox and to find in row source and delete as well

  1. #1
    Forum Expert sintek's Avatar
    Join Date
    12-04-2015
    Location
    Cape Town
    MS-Off Ver
    2013 | 2016 | 2019
    Posts
    9,013

    VBA to remove item selected from ListBox and to find in row source and delete as well

    Hi All

    I have attached a workbook with a snap shot of my Userform and the row source it is populated from.
    What I need to do is the following:

    When an item is selected on the userform, I need it to be removed form ListBox when I hit Void button and then the item must be found on my Row source and the entire row must then be deleted. any Ideas Thanks All.

    Code for the first remove part i found is as follows:
    Please Login or Register  to view this content.
    Here is the code that populates my ListBox

    Please Login or Register  to view this content.
    Attached Files Attached Files
    Last edited by sintek; 08-29-2016 at 09:49 AM.

  2. #2
    Forum Expert sintek's Avatar
    Join Date
    12-04-2015
    Location
    Cape Town
    MS-Off Ver
    2013 | 2016 | 2019
    Posts
    9,013

    Re: VBA to remove item selected from ListBox and to find in row source and delete as well

    Hi All

    I found some code and ammended. However this code deletes the entire cell and moves up all below cells. How can I amend to delete entire row.
    Please Login or Register  to view this content.

  3. #3
    Forum Expert sintek's Avatar
    Join Date
    12-04-2015
    Location
    Cape Town
    MS-Off Ver
    2013 | 2016 | 2019
    Posts
    9,013

    Re: VBA to remove item selected from ListBox and to find in row source and delete as well

    Hi All

    Not to worry. I figured it out. Herewith code:

    Please Login or Register  to view this content.

+ 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. [SOLVED] Delete item from listbox and row source/named range
    By syedmehdi in forum Excel General
    Replies: 14
    Last Post: 11-12-2019, 06:55 PM
  2. Get the name of a listbox where an item is selected
    By Jerbinator in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 04-22-2016, 03:16 PM
  3. Listbox item Highlighted but not Selected
    By shawnvw in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 12-17-2015, 05:29 PM
  4. Selected item in first listbox.
    By waka in forum Access Tables & Databases
    Replies: 1
    Last Post: 02-09-2015, 11:45 PM
  5. [SOLVED] Selected Listbox Item to Textbox
    By TheRobsterUK in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 09-17-2014, 04:07 PM
  6. Remove selected item from listbox
    By ChrisMattock in forum Excel Programming / VBA / Macros
    Replies: 10
    Last Post: 02-28-2014, 08:36 AM
  7. Delete row source from selected line in ListBox
    By PinkMafia14 in forum Excel Programming / VBA / Macros
    Replies: 16
    Last Post: 02-12-2013, 03:15 PM

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