+ Reply to Thread
Results 1 to 7 of 7

Write each sheet name to a worksheet

  1. #1
    Registered User
    Join Date
    03-21-2015
    Location
    GrassyKnoll
    MS-Off Ver
    2010
    Posts
    82

    Write each sheet name to a worksheet

    Hi

    I am printing each worksheet name to the immediate window. How could I write each one to a cell in a workbooks worksheet?
    Please Login or Register  to view this content.

  2. #2
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    44,521

    Re: Write each sheet name to a worksheet

    Change:
    Please Login or Register  to view this content.
    to
    Please Login or Register  to view this content.

    Regards, TMS
    Trevor Shuttleworth - Retired Excel/VBA Consultant

    I dream of a better world where chickens can cross the road without having their motives questioned

    'Being unapologetic means never having to say you're sorry' John Cooper Clarke


  3. #3
    Registered User
    Join Date
    03-21-2015
    Location
    GrassyKnoll
    MS-Off Ver
    2010
    Posts
    82

    Re: Write each sheet name to a worksheet

    Hi & thank you Trevor that writes each one to the same cell. I wanted to amke a list of all worksheet names in the activesheet. How can I make Excel write each sheet name to an individual cell so I have a list of the names?

  4. #4
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    44,521

    Re: Write each sheet name to a worksheet

    I wasn't sure exactly what you wanted. The amendment writes the name to cell A1 for the sheet, so not really the SAME cell ... same cell reference, different sheet.

    If you want to make a list, you need to define what sheet you want the list on, and whether or not to include or exclude the sheet with the list (from the list).

    Regards, TMS

  5. #5
    Registered User
    Join Date
    03-21-2015
    Location
    GrassyKnoll
    MS-Off Ver
    2010
    Posts
    82

    Re: Write each sheet name to a worksheet

    I wasn't sure exactly what you wanted. The amendment writes the name to cell A1 for the sheet, so not really the SAME cell ... same cell reference, different sheet.
    ok I see what you are saying now


    Please Login or Register  to view this content.
    It works now. How did I do? Would you do it differantly

  6. #6
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    44,521

    Re: Write each sheet name to a worksheet

    You're welcome. Thanks for the rep.

    How did I do? Would you do it differently?
    You did good. The only thing I would probably do differently is to create and nominate a specific worksheet fro the Table of Contents. As it stands, if/when you run the code, it will write to the active sheet ... which may not be the one you intended and it could, therefore, overwrite data.

    Regards, TMS

  7. #7
    Forum Expert Tony Valko's Avatar
    Join Date
    12-31-2011
    Location
    Pittsburgh
    MS-Off Ver
    2002, 2007:2013
    Posts
    18,890

    Re: Write each sheet name to a worksheet

    Biff
    Microsoft MVP Excel
    Keep It Simple Stupid

    Let's Go Pens. We Want The Cup.

+ 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. cycle through records on one sheet and write 6 rows per record on another sheet
    By Phaster in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 06-12-2014, 04:42 AM
  2. Replies: 6
    Last Post: 07-18-2013, 02:34 AM
  3. [SOLVED] Find duplicates in colA in one sheet and write them in another sheet with row reference
    By Masun in forum Excel Programming / VBA / Macros
    Replies: 16
    Last Post: 03-02-2013, 06:23 PM
  4. How to write macro for copy data from multiple sheet to a single sheet.
    By Santoshmoni in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 02-16-2011, 04:39 AM
  5. Macro creating new worksheet. Is it possible to write running code for sheet
    By Kernal87 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 07-30-2008, 06:17 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