+ Reply to Thread
Results 1 to 2 of 2

For each Table in ActiveSheet.ListObjects (Copy TableHeader) How?

  1. #1
    Forum Contributor
    Join Date
    03-08-2018
    Location
    Denmark
    MS-Off Ver
    2016 for Windows
    Posts
    413

    For each Table in ActiveSheet.ListObjects (Copy TableHeader) How?

    I have this Code to Loop through all Tables on a sheet and copy data to another sheet and it works fine...But
    Instead of copying the TableName I would like to copy the TableHeader, and that has turned out to be more difficult than I thought.

    I can find the TableHeader (TableName = SourceSheet.ListObjects(1).ListColumns(1))
    But when I put it in my loop, It keeps returning the TableHeader of the first Table.

    I hope one of you guys have an idear how to solve this.

    I will post two pictures so it can give you an idear.3.PNG4.PNG




    Please Login or Register  to view this content.

  2. #2
    Forum Moderator - RIP Richard Buttrey's Avatar
    Join Date
    01-14-2008
    Location
    Stockton Heath, Cheshire, UK
    MS-Off Ver
    Office 365, Excel for Windows 2010 & Excel for Mac
    Posts
    29,464

    Re: For each Table in ActiveSheet.ListObjects (Copy TableHeader) How?

    Please upload a workbook or a representative cut down copy, anonymised if necessary. It is always easier to advise if we can see your request in its context.

    Show a before and after situation with manually calculated results, explaining which information is data and which is results, and if it's not blindingly obvious how you have arrived at your results some explanatory notes as well.
    Richard Buttrey

    RIP - d. 06/10/2022

    If any of the responses have helped then please consider rating them by clicking the small star icon below the post.

+ 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. Is it possible to Loop through Tables and Copy TableHeader ?
    By nordicdust in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 12-28-2018, 07:00 PM
  2. Copy multiple listobjects and change name
    By jaryszek in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 10-09-2018, 04:07 PM
  3. excel vba - Copy specific rows/columns from one ListObjects to another
    By terriertrip in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 03-08-2018, 11:43 AM
  4. How to refer to Table inside a sheet using ListObjects
    By oliverpa in forum Excel Programming / VBA / Macros
    Replies: 11
    Last Post: 11-23-2017, 11:23 PM
  5. [SOLVED] Undo "ActiveSheet.UsedRange.Value = ActiveSheet.UsedRange.Value" after copy
    By nigelog in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 07-26-2016, 06:35 AM
  6. Me.ListObjects("tblName").DataBodyRange.Rows.Delete - Does Me Not Like ListObjects?
    By snapfade in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 01-30-2014, 01:56 PM
  7. ActiveSheet.ListObjects Variable Help
    By nickflorez in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 03-16-2011, 01:00 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