Reading tabs names

G

Guest

Is there a way to go thru the list of tabs, and read their names from within
a cell?
Is there a function to do that?

Thanks, Stefano
 
G

Guest

The following function:

Function tabname(i As Integer) As String
If i > Worksheets.Count Then
tabname = ""
Exit Function
End If
tabname = Worksheets(i).Name
End Function

will return the name of the i th worksheet. For example:
=tabname(3)
will return the name of the third worksheet.
 
D

Don Guillett

not clear how you want this but

for each ws in worksheets
msgbox ws.name
next ws
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top