ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   Reading tabs name (https://www.excelbanter.com/excel-discussion-misc-queries/113294-reading-tabs-name.html)

smaruzzi

Reading tabs name
 
Is there a sinple way - or a function - to go thru the list of tabs and
extract their names?

Thanks, Stefano

Gord Dibben

Reading tabs name
 
Private Sub ListSheets()
'list of sheet names starting at A1
Dim rng As Range
Dim i As Integer
Set rng = Range("A1")
For Each Sheet In ActiveWorkbook.Sheets
rng.Offset(i, 0).Value = Sheet.Name
i = i + 1
Next Sheet
End Sub


Gord Dibben MS Excel MVP

On Sat, 7 Oct 2006 04:59:01 -0700, smaruzzi
wrote:

Is there a sinple way - or a function - to go thru the list of tabs and
extract their names?

Thanks, Stefano




All times are GMT +1. The time now is 09:55 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com