+ Reply to Thread
Results 1 to 4 of 4

Help on VBA code to delete a row in more than one table from a single command button

  1. #1
    Registered User
    Join Date
    07-13-2017
    Location
    Newcastle, UK
    MS-Off Ver
    2010
    Posts
    10

    Help on VBA code to delete a row in more than one table from a single command button

    Hi All,

    i am very new to excel and VBA/Macro. Yesterday I was given some excellent help with defining some code to create a command button that would delete and insert a row into a table that I had defined. I now want to take this one step further and use the same command button to insert/delete rows from another table I have created in the same sheet.

    I have manged to get it working for an insert but not for the delete more through luck than logic. If have attached the code (apologies if I am not supposed to do this). If anyone could help that would be ideal.

    Please Login or Register  to view this content.
    Please Login or Register  to view this content.
    Regards Graham
    Last edited by alansidman; 07-21-2017 at 07:54 AM. Reason: missed some code off original

  2. #2
    Forum Moderator alansidman's Avatar
    Join Date
    02-02-2010
    Location
    Steamboat Springs, CO
    MS-Off Ver
    MS Office 365 insider Version 2506 Win 11
    Posts
    24,904

    Re: Help on VBA code to delete a row in more than one table from a single command button

    Code Tags Added
    Your post does not comply with Rule 3 of our Forum RULES. Use code tags around code.

    Posting code between [CODE]Please [url=https://www.excelforum.com/login.php]Login or Register [/url] to view this content.[/CODE] tags makes your code much easier to read and copy for testing, it also maintains VBA formatting.

    Highlight your code and click the # icon at the top of your post window. More information about these and other tags can be found at http://www.excelforum.com/forum-rule...rum-rules.html



    (I have added them for you today. Please take a few minutes to read all Forum Rules and comply in the future.)
    Alan עַם יִשְׂרָאֵל חַי


    Change an Ugly Report with Power Query
    Database Normalization
    Complete Guide to Power Query
    Man's Mind Stretched to New Dimensions Never Returns to Its Original Form

  3. #3
    Registered User
    Join Date
    07-13-2017
    Location
    Newcastle, UK
    MS-Off Ver
    2010
    Posts
    10

    Re: Help on VBA code to delete a row in more than one table from a single command button

    Thank You Alan - Point taken

  4. #4
    Registered User
    Join Date
    07-13-2017
    Location
    Newcastle, UK
    MS-Off Ver
    2010
    Posts
    10

    Re: Help on VBA code to delete a row in more than one table from a single command button

    Hi All,

    To try and clarify my issue I have attached the spreadsheet to hopefully explain my self a bit better.
    The insert/delete row works ok on the TAB named Brickwork but I want to apply this to StudWall as well and a few other tabs.
    However, I dont know how to apply the code to more than one table on multiple tabs.

    Thanks Graham
    Attached Files Attached Files

+ 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. VBA Code does not respond to a single click of command button
    By Buddy8 in forum Excel Programming / VBA / Macros
    Replies: 10
    Last Post: 10-18-2016, 06:00 PM
  2. 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
  3. [SOLVED] Delete Entire Row based on single cell value using VBA command Button
    By rain4uu in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 12-07-2014, 12:53 PM
  4. [SOLVED] Userform: Code for DELETE on a command button
    By Gal403 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 08-25-2014, 01:28 AM
  5. Create a command button with code with a command button
    By jakara in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 03-29-2013, 01:28 PM
  6. Code for a master command button to change the backcolor of multiple command buttons?
    By panttherm5 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 08-16-2012, 10:11 PM
  7. Command Button Code to Delete Unprotected Cells Only
    By macky1730 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 02-01-2011, 04:30 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