+ Reply to Thread
Results 1 to 3 of 3

Adding/removing the delete button automatically to a database in table

  1. #1
    Registered User
    Join Date
    07-07-2014
    Location
    London, England
    MS-Off Ver
    Professional 2010
    Posts
    14

    Adding/removing the delete button automatically to a database in table

    Hi all!

    I've been working for a while on a tool with a database library that allows the user to add new entries. My database library is in table format and I would like it to also have a 'button' or 'cross' that allows the user to delete an entry with a single click followed by a userform that asks the regular annoying 'Are you sure' pop-up.

    Now I do know how to insert this macro by recording for each single row, what I would like is for these buttons to be added to the table with each new entry automatically and to be removed when the entry is removed.

    Can anyone help?

  2. #2
    Forum Expert
    Join Date
    01-23-2013
    Location
    USA
    MS-Off Ver
    Microsoft 365 aka Office 365
    Posts
    3,863

    Re: Adding/removing the delete button automatically to a database in table

    Hi dmbroekhuysen,

    What you want can be done, but requires a button for each item.

    As an alternative, I suggest 'Double-Clicking' any item in the table. See the attached file which is a simple implementation of the 'Double Click' idea.

    Lewis

    Sheet1 module code:
    Please Login or Register  to view this content.

  3. #3
    Registered User
    Join Date
    07-07-2014
    Location
    London, England
    MS-Off Ver
    Professional 2010
    Posts
    14

    Re: Adding/removing the delete button automatically to a database in table

    Hi LJMetzger!

    Thank you for your contribution! After modifying it a bit I managed to implement it to my file and successfully delete the selected row using the double click function. All I had to change was the action taken after iReply = vbYes, which is not just a messagebox but also deleting the row using the code ' Selection.Delete Shift:=xlUp'.

    Thanks again!

+ 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] remove database by command instead of clicking delete button
    By dharmang1910 in forum Excel Programming / VBA / Macros
    Replies: 9
    Last Post: 08-30-2013, 01:19 PM
  2. Adding data to another table in database based on condition
    By chrisjack001 in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 11-03-2010, 05:17 PM
  3. Adding Date automatically on Command Button
    By baisty182 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 08-09-2010, 11:09 AM
  4. [SOLVED] Removing and Adding Pivot Table Fields
    By erick.mckesson@gmail.com in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 05-01-2006, 09:00 PM
  5. [SOLVED] Delete a Table not in Current Database
    By Ross in forum Excel General
    Replies: 3
    Last Post: 05-12-2005, 10:06 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