Results 1 to 6 of 6

Delete Table Row command button

Threaded View

  1. #1
    Registered User
    Join Date
    08-11-2021
    Location
    Florida
    MS-Off Ver
    Excel 2019
    Posts
    75

    Delete Table Row command button

    Hello all,

    I have a table that gets a row added each time a command button is pressed; However, because the table is auto-sorted, the row moves unreliably to different numerical rows. How would I add a second command button that will delete the last added row (almost like undoing the add command button)?

    see the add command button below:

    Sub CommandButton1_Click()
    
    Application.EnableEvents = False
    
    With Sheets("Maintenance Reporting Page")
    .Range("B15").EntireRow.Insert Shift:=xlDown
    .Range("E15").Value = Format(Now, "dd-mm-yy")
    End With
    
    Sheets("Maintenance Reporting Page").Range("B14:H14").Select
    Selection.Borders.Weight = xlThin
    
    Application.EnableEvents = True
    
    End Sub
    Last edited by DropAGearN'Disappear; 08-19-2021 at 12:37 PM.

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. [SOLVED] Help on VBA code to delete a row in more than one table from a single command button
    By grahamlees in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 07-24-2017, 05:46 AM
  2. [SOLVED] Delete command button
    By KBSH in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 02-23-2016, 07:41 AM
  3. VBA code to create command button. Print all sheets then delete command button.
    By Declamatory in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 11-15-2015, 05:18 PM
  4. [SOLVED] How to delete a row using a command button
    By AndyMan81 in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 08-01-2014, 10:20 AM
  5. [SOLVED] Delete a VBA Command Button after run?
    By NicksDad in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 05-18-2013, 10:27 AM
  6. Delete command button ?
    By SpookiePower in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 01-23-2006, 10:55 AM
  7. Delete with command button?
    By John in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 03-17-2005, 10:06 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