+ Reply to Thread
Results 1 to 6 of 6

button to del row

  1. #1
    Registered User
    Join Date
    09-15-2014
    Location
    michigan
    MS-Off Ver
    2003
    Posts
    94

    button to del row

    push button example.xls
    I have attached my example what I'm looking to do is delete a row using a push button
    so when they push the Delete button it will delete the row that button is on I don't know how to use the button to select what row i wish to delete
    and i mean delete entire row not just the contents of the row.
    my sheet usually has any where from 30-100 rows of data and each day 1-15 scattered rows gets deleted and 1-30 rows get added each day, so i would like this macro be a general macro that uses the button push as the row selector so I only have 1 macro with multiple buttons
    push button example.xls

  2. #2
    Forum Expert JasperD's Avatar
    Join Date
    05-07-2013
    Location
    Netherlands
    MS-Off Ver
    Excel 2016
    Posts
    1,393

    Re: button to del row

    It's easier to put one DEL button in the top of your sheet and then link it to the following macro:

    Please Login or Register  to view this content.
    If you push it, it will delete the row with the selected cell.
    Enjoy
    Please click the * below if this helps

  3. #3
    Registered User
    Join Date
    09-15-2014
    Location
    michigan
    MS-Off Ver
    2003
    Posts
    94

    Re: button to del row

    I get that that's easier but some times its 3 pages long I would have to scroll down select then back up they way I'm doing it now is faster than that but thanks for the help but your solution isn't what I'm looking for, I already have a tool bar button for that. I'm trying to simplify things for another users because they are screwing with my formulas by deleting the contents of the row and then copy and pasting the remaining rows up a line and I'm trying to prevent this from happening so I don't have to rewrite all my formulas on days I have off.

  4. #4
    Forum Expert JasperD's Avatar
    Join Date
    05-07-2013
    Location
    Netherlands
    MS-Off Ver
    Excel 2016
    Posts
    1,393

    Re: button to del row

    Darn, you make me write two lines of code instead of my preferred one...

    Please Login or Register  to view this content.
    throw into a module on your sheet and it'll work.
    It'll delete the row + the button.

  5. #5
    Registered User
    Join Date
    09-15-2014
    Location
    michigan
    MS-Off Ver
    2003
    Posts
    94

    Re: button to del row

    That works great but I only see one issue with this. you cant undo the delete can the undo feature be enabled with this style of row delete or is it because I'm using a macro to do the work for me
    Last edited by MATT.B; 04-14-2015 at 01:53 PM.

  6. #6
    Forum Expert JasperD's Avatar
    Join Date
    05-07-2013
    Location
    Netherlands
    MS-Off Ver
    Excel 2016
    Posts
    1,393

    Re: button to del row

    Hi Matt,

    this cannot be undone, sorry.

+ 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. Create running stopwatch/timer with 1 button (start/stop). No reset button.
    By leeroy2612 in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 05-26-2021, 12:59 AM
  2. Replies: 0
    Last Post: 06-10-2014, 10:44 PM
  3. Button to copy specific cells to another sheet, lock button if cell has text
    By elmerg in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 04-14-2014, 02:10 AM
  4. [SOLVED] Linking together an Options Button and a command button inorder to load separate forms
    By emilyloz in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 05-23-2013, 02:10 PM
  5. Hide a picture button placed in all sheets using a option button (form control)
    By lagaranch in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 12-26-2012, 10:33 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