+ Reply to Thread
Results 1 to 2 of 2

Loop through worksheets and identify name of table on each

  1. #1
    Registered User
    Join Date
    12-02-2010
    Location
    London, England
    MS-Off Ver
    Excel 2003
    Posts
    32

    Loop through worksheets and identify name of table on each

    I'd like to loop through three worksheets in my workbook and identify the name of the table on each (each worksheet has only one table).

    The code below loops through the worksheets but I'm not sure how to get the name of the table on each. I tried using "Set CurrentTable = ActiveSheet.ListObjects(1)" but the ActiveSheet never changes - it's always the first sheet in the loop.

    Please Login or Register  to view this content.

  2. #2
    Forum Guru Norie's Avatar
    Join Date
    02-02-2005
    Location
    Stirling, Scotland
    MS-Off Ver
    Microsoft Office 365
    Posts
    19,643

    Re: Loop through worksheets and identify name of table on each

    Instead of ActiveSheet use Worksheets(CurrentWorksheet).
    If posting code please use code tags, see here.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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