list of workbook tabs

K

kijijijt

is there any way to create a list of all the tabs of a workbook on one worksheet? thanks
 
C

Claus Busch

Hi,

Am Fri, 25 Oct 2013 12:06:44 -0700 (PDT) schrieb (e-mail address removed):
is there any way to create a list of all the tabs of a workbook on one worksheet? thanks

try:

Sub Tabs()
Dim wsh As Worksheet
Dim i As Integer

For Each wsh In ThisWorkbook.Worksheets
i = i + 1
Sheets("Sheet1").Cells(i, 1) = wsh.Name
Next
End Sub


Regards
Claus B.
 
K

kijijijt

Hi,



Am Fri, 25 Oct 2013 12:06:44 -0700 (PDT) schrieb (e-mail address removed):






try:



Sub Tabs()

Dim wsh As Worksheet

Dim i As Integer



For Each wsh In ThisWorkbook.Worksheets

i = i + 1

Sheets("Sheet1").Cells(i, 1) = wsh.Name

Next

End Sub





Regards

Claus B.

--

Win XP PRof SP2 / Vista Ultimate SP2

Office 2003 SP2 /2007 Ultimate SP2

works great, thank you Claus. One more thing, in the adjacent column I would like to reference data in a specific cell from the corresponding tab. thanks again.
 
C

Claus Busch

Hi,

Am Fri, 25 Oct 2013 13:07:49 -0700 (PDT) schrieb (e-mail address removed):

One more thing, in the adjacent column I would like to reference data in a specific cell from the corresponding tab. thanks again.

what do you want to have? The range address of each tab?


Regards
Claus B.
 
K

kijijijt

Hi,



Am Fri, 25 Oct 2013 13:07:49 -0700 (PDT) schrieb (e-mail address removed):








what do you want to have? The range address of each tab?





Regards

Claus B.

--

Win XP PRof SP2 / Vista Ultimate SP2

Office 2003 SP2 /2007 Ultimate SP2

I would like to have a worksheet that lists all tabs in the workbook and also references a specific cell in each tab next to the tab name on the worksheet
 
C

Claus Busch

Hi,

Am Fri, 25 Oct 2013 13:36:50 -0700 (PDT) schrieb (e-mail address removed):
I would like to have a worksheet that lists all tabs in the workbook and also references a specific cell in each tab next to the tab name on the worksheet

if the specific cell is C3 then try (else modify to suit):

Sub Tabs()
Dim wsh As Worksheet
Dim i As Integer

For Each wsh In ThisWorkbook.Worksheets
With Sheets("Sheet1")
If wsh.Name <> .Name Then
i = i + 1
.Cells(i, 1) = wsh.Name
.Cells(i, 2) = wsh.Range("C1")
End If
End With
Next
End Sub


Regards
Claus B.
 
K

kijijijt

Hi,



Am Fri, 25 Oct 2013 13:36:50 -0700 (PDT) schrieb (e-mail address removed):






if the specific cell is C3 then try (else modify to suit):



Sub Tabs()

Dim wsh As Worksheet

Dim i As Integer



For Each wsh In ThisWorkbook.Worksheets

With Sheets("Sheet1")

If wsh.Name <> .Name Then

i = i + 1

.Cells(i, 1) = wsh.Name

.Cells(i, 2) = wsh.Range("C1")

End If

End With

Next

End Sub





Regards

Claus B.

--

Win XP PRof SP2 / Vista Ultimate SP2

Office 2003 SP2 /2007 Ultimate SP2

works great. thank you so much for all your help!
 

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