Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 3
Default Summary of Worksheet names

I am trying to create a list of worksheet names on my first worksheet,
similar to a table of contents. Is there a way of linking to the worksheet
names, so this table gets updated automatically?
Thanks,
Niamh
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 11,058
Default Summary of Worksheet names

If you run this small macro, it will produce a list of sheets that are
"clickable":

Sub EasyToc()
' gsnuxx
Dim ws As Worksheet
Dim n As String
Dim p1 As String, dq As String, sq As String
dq = Chr(34)
sq = Chr(39)
p1 = "=HYPERLINK(" & dq & "#'"
p2 = "'!A1" & dq & "," & dq
k = 1
For Each ws In Worksheets
n = ws.Name
Cells(k, 1).Formula = p1 & n & p2 & n & dq & ")"
k = k + 1
Next
End Sub

--
Gary''s Student - gsnu200816


"Niamh" wrote:

I am trying to create a list of worksheet names on my first worksheet,
similar to a table of contents. Is there a way of linking to the worksheet
names, so this table gets updated automatically?
Thanks,
Niamh

  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 3,101
Default Summary of Worksheet names

'Do right click on the sheet that will be your summary sheet. Select view
code.
'Paste this into the sheet module. Now go back to your workbook click any
'other sheet in your workbook. Then click back on your summary sheet.

Private Sub Worksheet_Activate()
Dim ws As Worksheet
Dim i As Long
i = 3
Columns("A:A").ClearContents
For Each ws In Worksheets
If ws.Name < ActiveSheet.Name Then
Range("A" & i).Value = ws.Name
i = i + 1
End If
Next ws
End Sub

"Niamh" wrote:

I am trying to create a list of worksheet names on my first worksheet,
similar to a table of contents. Is there a way of linking to the worksheet
names, so this table gets updated automatically?
Thanks,
Niamh

  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 21
Default Summary of Worksheet names

Dear Gary,

The macro is very very useful to me. Moreover, if I want to list out the
worksheet names with hyperlink done automatically of another workbook, how
should I modify the macro?

Thanks in advance.

Fanny

"Gary''s Student" wrote:

If you run this small macro, it will produce a list of sheets that are
"clickable":

Sub EasyToc()
' gsnuxx
Dim ws As Worksheet
Dim n As String
Dim p1 As String, dq As String, sq As String
dq = Chr(34)
sq = Chr(39)
p1 = "=HYPERLINK(" & dq & "#'"
p2 = "'!A1" & dq & "," & dq
k = 1
For Each ws In Worksheets
n = ws.Name
Cells(k, 1).Formula = p1 & n & p2 & n & dq & ")"
k = k + 1
Next
End Sub

--
Gary''s Student - gsnu200816


"Niamh" wrote:

I am trying to create a list of worksheet names on my first worksheet,
similar to a table of contents. Is there a way of linking to the worksheet
names, so this table gets updated automatically?
Thanks,
Niamh

  #5   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 2,420
Default Summary of Worksheet names

Sub EasyToc()
' gsnuxx
Dim ws As Worksheet
Dim n As String
Dim p1 As String, dq As String, sq As String
dq = Chr(34)
sq = Chr(39)
p1 = "=HYPERLINK(" & dq & "#'"
p2 = "'!A1" & dq & "," & dq
k = 1
For Each ws In Workbooks("some book.xls").Worksheets
n = ws.Name
Cells(k, 1).Formula = p1 & n & p2 & n & dq & ")"
k = k + 1
Next
End Sub


--
__________________________________
HTH

Bob

"Fanny" wrote in message
...
Dear Gary,

The macro is very very useful to me. Moreover, if I want to list out the
worksheet names with hyperlink done automatically of another workbook, how
should I modify the macro?

Thanks in advance.

Fanny

"Gary''s Student" wrote:

If you run this small macro, it will produce a list of sheets that are
"clickable":

Sub EasyToc()
' gsnuxx
Dim ws As Worksheet
Dim n As String
Dim p1 As String, dq As String, sq As String
dq = Chr(34)
sq = Chr(39)
p1 = "=HYPERLINK(" & dq & "#'"
p2 = "'!A1" & dq & "," & dq
k = 1
For Each ws In Worksheets
n = ws.Name
Cells(k, 1).Formula = p1 & n & p2 & n & dq & ")"
k = k + 1
Next
End Sub

--
Gary''s Student - gsnu200816


"Niamh" wrote:

I am trying to create a list of worksheet names on my first worksheet,
similar to a table of contents. Is there a way of linking to the
worksheet
names, so this table gets updated automatically?
Thanks,
Niamh





  #6   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 21
Default Summary of Worksheet names

Dear Bob,

Your suggestion has improved my problem that worksheet name listing can be
retrieved from a protected workbook, provided that I must manually open the
source workbook. However, I still need to manually make hyperlink from the
new listing to link to the protected workbook to ease the checking.

Pls check if I can change the workbook name (excel file name) at the
worksheet like defined names or enter the excel file name at a designated
cell rather than via the macro because I need to retrieve the worksheet names
from protected workbooks frequently. My problem is that I need to fill up
package files from Head Office and each workbook has many worksheets with
similar names which can be easily missed.

With Gary's macro, I can retrieve all the worksheet names and automatically
hyperlinked to the selected worksheet. However, I cannot apply the said
macro when the workbook is protected.

Thanks for your valuable assistance.

Fanny



"Bob Phillips" wrote:

Sub EasyToc()
' gsnuxx
Dim ws As Worksheet
Dim n As String
Dim p1 As String, dq As String, sq As String
dq = Chr(34)
sq = Chr(39)
p1 = "=HYPERLINK(" & dq & "#'"
p2 = "'!A1" & dq & "," & dq
k = 1
For Each ws In Workbooks("some book.xls").Worksheets
n = ws.Name
Cells(k, 1).Formula = p1 & n & p2 & n & dq & ")"
k = k + 1
Next
End Sub


--
__________________________________
HTH

Bob

"Fanny" wrote in message
...
Dear Gary,

The macro is very very useful to me. Moreover, if I want to list out the
worksheet names with hyperlink done automatically of another workbook, how
should I modify the macro?

Thanks in advance.

Fanny

"Gary''s Student" wrote:

If you run this small macro, it will produce a list of sheets that are
"clickable":

Sub EasyToc()
' gsnuxx
Dim ws As Worksheet
Dim n As String
Dim p1 As String, dq As String, sq As String
dq = Chr(34)
sq = Chr(39)
p1 = "=HYPERLINK(" & dq & "#'"
p2 = "'!A1" & dq & "," & dq
k = 1
For Each ws In Worksheets
n = ws.Name
Cells(k, 1).Formula = p1 & n & p2 & n & dq & ")"
k = k + 1
Next
End Sub

--
Gary''s Student - gsnu200816


"Niamh" wrote:

I am trying to create a list of worksheet names on my first worksheet,
similar to a table of contents. Is there a way of linking to the
worksheet
names, so this table gets updated automatically?
Thanks,
Niamh




Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Trying to list tab/worksheet names in a summary worksheet Mich Excel Discussion (Misc queries) 1 February 7th 08 02:07 AM
how do you make a summary page showing the workbook name with the excel sheet names carole New Users to Excel 1 May 22nd 06 08:31 PM
Displaying information (contained in defined names) on a summary sheet, in different row numbers? [email protected] Excel Discussion (Misc queries) 0 May 15th 06 02:46 PM
totals sheet- need summary of column of names between sheets babs Excel Discussion (Misc queries) 6 February 6th 06 09:35 PM
Creating a list of worksheet names on a Summary PAge confusedexceler Excel Worksheet Functions 4 July 29th 05 01:11 AM


All times are GMT +1. The time now is 04:53 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"