+ Reply to Thread
Results 1 to 5 of 5

Delete entire row from worksheet, which is selected in 'Listbox1' on Userform

  1. #1
    Registered User
    Join Date
    05-21-2012
    Location
    Bangalore
    MS-Off Ver
    Excel 2010
    Posts
    15

    Delete entire row from worksheet, which is selected in 'Listbox1' on Userform

    Hello,

    There are 1 'ListBox' & 4 ComboBoxes on userform.

    As soon as Userform activates, 'ListBox1' is populated with whole data from worksheet (Project). Also the ComobBoxes with Column (A,B,C & D) data from same sheet.

    Based on 'ComboBox1, 2, 3 or 4' selection, the sheet (Project) is filtered and populated in 'ListBox1'. I thank again to 'jaslake' one of our excel-guru in this forum, for the help.

    Now my problem is:

    After 'CoboBoxes' filteration, I want to select any item in 'ListBox1' and delete from 'Project' sheet using commandbutton 'Delete'.

    Somebody, please help me. Your time and help is appreciated.

    Thank you
    Attached Files Attached Files
    Last edited by p_nayak268; 08-26-2013 at 08:28 AM.

  2. #2
    Forum Contributor
    Join Date
    08-11-2012
    Location
    bengalur
    MS-Off Ver
    Excel 2003, 2007
    Posts
    152

    Re: Delete entire row from worksheet, which is selected in 'Listbox1' on Userform

    Try this Attachment. This will work for you

    _____________________________________________________________________________________________________________________________
    Please click * to say thank You
    Attached Files Attached Files

  3. #3
    Registered User
    Join Date
    05-21-2012
    Location
    Bangalore
    MS-Off Ver
    Excel 2010
    Posts
    15

    Re: Delete entire row from worksheet, which is selected in 'Listbox1' on Userform

    Hi Shyam,

    The code works well before any 'ComboBox' filteration. It does not work if any item selected after filteration.

    Thank you.

  4. #4
    Forum Contributor
    Join Date
    08-11-2012
    Location
    bengalur
    MS-Off Ver
    Excel 2003, 2007
    Posts
    152

    Re: Delete entire row from worksheet, which is selected in 'Listbox1' on Userform

    I have put Trim function to avoid additional spaces at end and hope this works.

    ________________________________________________________________________________________________________
    Please click * to say thank you
    Attached Files Attached Files

  5. #5
    Registered User
    Join Date
    05-21-2012
    Location
    Bangalore
    MS-Off Ver
    Excel 2010
    Posts
    15

    Re: Delete entire row from worksheet, which is selected in 'Listbox1' on Userform

    Hi Shyam,

    It's perfect.

    I have to just work around to update the listbox right after delete. But, your code works perfect.

    Thank you very with this quick help.

+ 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. How to Show record from Sheet2 not Sheet 1 in the UserForm ListBox1.
    By z-eighty2 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 06-28-2013, 05:39 PM
  2. Replies: 6
    Last Post: 08-06-2012, 01:09 PM
  3. Remove row source from userform listbox1 search results
    By pells in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 01-30-2012, 09:29 AM
  4. Delete Range when checkbox in Userform is Selected
    By Jonathan78 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 07-04-2010, 03:13 AM
  5. [SOLVED] UserForm:Resume to ListBox1
    By damorrison in forum Excel General
    Replies: 1
    Last Post: 08-20-2006, 11:25 AM

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