List Sheet Names & Internal Names

lapta301

Well-known Member
Joined
Nov 12, 2004
Messages
1,001
Office Version
  1. 365
Platform
  1. Windows
Dear All

Is it possible to produce a list on a new worksheet of all sheet names and their their internal names within a workbook?

If so I would like the tabbed name's to begin in say A2 with the corresponding internal name in B2.

As ever any help would be most appreciated
 

Excel Facts

Convert text numbers to real numbers
Select a column containing text numbers. Press Alt+D E F to quickly convert text to numbers. Faster than "Convert to Number"
The list will be in a NEW sheet..

Try
Code:
Sub SheetList()
Dim ws As Worksheet
Dim listsheet As Worksheet
Set listsheet = Sheets.Add
With listsheet
    .Name = "SheetList"
    .Range("A1").Value = "TabName"
    .Range("B1").Value = "InternalName"
    .Range("C1").Value = "Index#"
    For Each ws In Worksheets
        .Range("A2").Offset(rc, 0).Value = ws.Name
        .Range("B2").Offset(rc, 0).Value = ws.CodeName
        .Range("C2").Offset(rc, 0).Value = ws.Index
        rc = rc + 1
    Next ws
End With
End Sub

I also threw in the Sheet's Index # in column C (the 3rd method of referring to a sheet)
 
Upvote 0
jonmo1

Sorry to activate this again which is working fine but and I'm not sure if this right thing to ask but I wonder if it's possible to merge this with the final piece of code here

http://www.mrexcel.com/forum/showthread.php?24957-Index-Worksheets

which adds a hyperlink to the sheet name and a description in column B.

If possible I'd like the internal name and index no to go in columns C & D

Many thanks

Steve
 
Last edited:
Upvote 0

Forum statistics

Threads
1,224,586
Messages
6,179,730
Members
452,939
Latest member
WCrawford

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top