+ Reply to Thread
Results 1 to 2 of 2

deleting contents of tables on seperate worksheets while keeping the headers

  1. #1
    Forum Contributor
    Join Date
    02-27-2020
    Location
    Rotterdam, The Netherlands
    MS-Off Ver
    2013
    Posts
    425

    deleting contents of tables on seperate worksheets while keeping the headers

    Hi, i am trying to write a macro that deletes the content of two tables on seperate worksheets. The headers should be kept. Somehow i am getting a messagebox of excel asking me wheter i want to deltethe whole row. I would like the macro to perform the task without the message box. How can i change my code to perform the task?

    Any input is much appreciated!

    Please Login or Register  to view this content.

  2. #2
    Forum Guru bakerman2's Avatar
    Join Date
    10-03-2012
    Location
    Antwerp, Belgium
    MS-Off Ver
    MO Prof Plus 2016
    Posts
    6,907

    Re: deleting contents of tables on seperate worksheets while keeping the headers

    Try this way.
    Please Login or Register  to view this content.
    Last edited by bakerman2; 07-09-2020 at 03:24 AM.
    Avoid using Select, Selection and Activate in your code. Use With ... End With instead.
    You can show your appreciation for those that have helped you by clicking the * at the bottom left of any of their posts.

+ 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] Copying Worksheets with Pivot Tables and keeping the data source with new Workbook
    By judgeh59 in forum Excel Programming / VBA / Macros
    Replies: 9
    Last Post: 10-29-2019, 12:55 PM
  2. [SOLVED] Deleting Rows With Contents Across Multiple Worksheets
    By liamfrancis2013 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 01-25-2019, 06:12 AM
  3. autofilter method of range class failed -header has tables headers and non table headers
    By naveen.acheanz in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 06-16-2016, 08:21 AM
  4. Export worksheets in a workbook to seperate files keeping Column C hidden
    By Sgligori in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 05-07-2015, 01:30 PM
  5. Replies: 4
    Last Post: 05-12-2014, 06:58 PM
  6. Replies: 4
    Last Post: 02-08-2014, 02:31 PM
  7. Keeping specific cell contents while deleting the rest?
    By Winterreise in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 07-10-2012, 05:11 PM

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