Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Sheets# and name
Does anyone know how to get the sheet number as well as the sheet name to be
displayed in one excel worksheet example: sheet37(foothill) would like to be able to shoow this for all 37 sheet in one worksheet -- Helping Is always a good thing |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Sheets# and name
I don't know exactly what you mean by "sheet number", but the following
macro will list all the sheets like you want with the sheet "number" being the sheet tab sequence. HTH Otto Sub ListShts() Dim ws As Worksheet Dim c As Long c = 1 For Each ws In ActiveWorkbook.Worksheets Range("A" & Rows.Count).End(xlUp).Offset(1).Value = _ "Sheet" & c & "(" & ws.Name & ")" c = c + 1 Next ws End Sub "QuietMan" wrote in message ... Does anyone know how to get the sheet number as well as the sheet name to be displayed in one excel worksheet example: sheet37(foothill) would like to be able to shoow this for all 37 sheet in one worksheet -- Helping Is always a good thing |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Sheets# and name
Hi
Try this Sub CreateListOfSheetsOnFirstSheet() Dim i%, ws As Worksheet For i = 1 To Worksheets.Count With Worksheets(1) Set ws = Worksheets(i) .Cells(i, 1).Value = ws.Name & "(" & ws.CodeName & ")" End With Next i End Sub "QuietMan" wrote: Does anyone know how to get the sheet number as well as the sheet name to be displayed in one excel worksheet example: sheet37(foothill) would like to be able to shoow this for all 37 sheet in one worksheet -- Helping Is always a good thing |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
Sheets# and name
Thanks
-- Helping Is always a good thing "Alok" wrote: Hi Try this Sub CreateListOfSheetsOnFirstSheet() Dim i%, ws As Worksheet For i = 1 To Worksheets.Count With Worksheets(1) Set ws = Worksheets(i) .Cells(i, 1).Value = ws.Name & "(" & ws.CodeName & ")" End With Next i End Sub "QuietMan" wrote: Does anyone know how to get the sheet number as well as the sheet name to be displayed in one excel worksheet example: sheet37(foothill) would like to be able to shoow this for all 37 sheet in one worksheet -- Helping Is always a good thing |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Multiple Sheets (Need to create 500 individual sheets in one workbook, pulling DATA | Excel Worksheet Functions | |||
How to repeat a code for selected sheets (or a contiguous range of sheets) in a Workbook? | Excel Worksheet Functions | |||
How to repeat a code for selected sheets (or a contiguous range of sheets) in a Workbook? | Excel Programming | |||
Macro for filter on protected workbook that works for all sheets, no matter what sheets are named? | Excel Programming | |||
Allocate Files to Sheets and Build a Master Sheet which Summarises All Sheets | Excel Programming |