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.
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.
Change:to![]()
Please Login or Register to view this content.
![]()
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
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?
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
ok I see what you are saying nowI 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.
It works now. How did I do? Would you do it differantly![]()
Please Login or Register to view this content.
![]()
You're welcome. Thanks for the rep.
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.How did I do? Would you do it differently?
Regards, TMS
Here's a formula method:
http://www.excelforum.com/showthread.php?t=929969
Biff
Microsoft MVP Excel
Keep It Simple Stupid
Let's Go Pens. We Want The Cup.
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks