+ Reply to Thread
Results 1 to 10 of 10

delete entire row selecting from listbox starting at specific row

  1. #1
    Registered User
    Join Date
    10-04-2018
    Location
    Cancun, Mexico
    MS-Off Ver
    2013 & 2016 32b
    Posts
    78

    delete entire row selecting from listbox starting at specific row

    i have a listbox that shows a worksheet data with 9 columns staring from row 16

    i need help to modify a code i have ,that supposed deleted selected row from worksheet ,

    but it should start counting from row 16 where data starts , but it starts deleting row 5 or row 6




    Please Login or Register  to view this content.
    thank you

  2. #2
    Forum Guru
    Join Date
    08-15-2004
    Location
    Tokyo, Japan
    MS-Off Ver
    2013 O.365
    Posts
    22,524

    Re: delete entire row selecting from listbox starting at specific row

    Quote Originally Posted by bluepomme View Post
    but it starts deleting row 5 or row 6
    Are you sure?
    Seems it deletes from 1st row when you select 1st item in the list.
    Simply + 16 would do.
    Please Login or Register  to view this content.
    However, I don't think the below part will work...
    Please Login or Register  to view this content.

  3. #3
    Registered User
    Join Date
    10-04-2018
    Location
    Cancun, Mexico
    MS-Off Ver
    2013 & 2016 32b
    Posts
    78

    Re: delete entire row selecting from listbox starting at specific row

    thank you it works well just with

    Please Login or Register  to view this content.
    but it deletes row 16 if no row is selected on listbox , can you tell how to do , to only deleted the row you selected when its selected ?

    sorry for my bad english

  4. #4
    Forum Guru
    Join Date
    08-15-2004
    Location
    Tokyo, Japan
    MS-Off Ver
    2013 O.365
    Posts
    22,524

    Re: delete entire row selecting from listbox starting at specific row

    You need to control when no line is selected first.
    Please Login or Register  to view this content.

  5. #5
    Registered User
    Join Date
    10-04-2018
    Location
    Cancun, Mexico
    MS-Off Ver
    2013 & 2016 32b
    Posts
    78

    Re: delete entire row selecting from listbox starting at specific row

    thank you

    but it shows a 424 error , do i need to make a set statement before ?

  6. #6
    Forum Guru
    Join Date
    08-15-2004
    Location
    Tokyo, Japan
    MS-Off Ver
    2013 O.365
    Posts
    22,524

    Re: delete entire row selecting from listbox starting at specific row

    OOps.. sorry a typo...
    Should be
    Please Login or Register  to view this content.

  7. #7
    Registered User
    Join Date
    10-04-2018
    Location
    Cancun, Mexico
    MS-Off Ver
    2013 & 2016 32b
    Posts
    78

    Re: delete entire row selecting from listbox starting at specific row

    It throws an 1004 error starting

    Please Login or Register  to view this content.

  8. #8
    Forum Guru
    Join Date
    08-15-2004
    Location
    Tokyo, Japan
    MS-Off Ver
    2013 O.365
    Posts
    22,524

    Re: delete entire row selecting from listbox starting at specific row

    OK... didn't see carefully.
    Should be
    Please Login or Register  to view this content.

  9. #9
    Registered User
    Join Date
    10-04-2018
    Location
    Cancun, Mexico
    MS-Off Ver
    2013 & 2016 32b
    Posts
    78

    Re: delete entire row selecting from listbox starting at specific row

    thank you for your big help

    now i just change
    Please Login or Register  to view this content.
    to
    Please Login or Register  to view this content.
    since i have 9 columns and its working fine

  10. #10
    Forum Guru
    Join Date
    08-15-2004
    Location
    Tokyo, Japan
    MS-Off Ver
    2013 O.365
    Posts
    22,524

    Re: delete entire row selecting from listbox starting at specific row

    That's good.

    If that takes care of your original question, please select Thread Tools from the menu link above and mark this thread as SOLVED.

+ 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. Filtered ListBox Selected item delete in sheet Entire Row
    By sijostephen in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 05-05-2019, 05:38 PM
  2. Code to delete entire row on sheet when selected in listbox
    By chrismccarthy17 in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 02-02-2016, 12:18 AM
  3. VBA Delete row starting with specific cell
    By klturi421 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 01-27-2016, 02:14 PM
  4. [SOLVED] Delete entire row that does not contain specific data
    By kosherboy in forum Excel Programming / VBA / Macros
    Replies: 25
    Last Post: 12-10-2015, 11:56 AM
  5. [SOLVED] Delete entire row for specific words
    By YasserKhalil in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 08-01-2015, 07:43 PM
  6. VBA delete entire row from rowsource with listbox
    By Hilton1982 in forum Excel Programming / VBA / Macros
    Replies: 12
    Last Post: 12-19-2012, 01:02 AM
  7. Selecting entire row when content is found in specific columns
    By skylerjo in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 09-23-2012, 03:36 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