Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]() Over a year ago a member of this forum directed me to a web sight with the code for a macro to build a table of contents in a work book. I have since deleted the macro and now I need it again. Can anyone help. Thanks -- phil1ray ------------------------------------------------------------------------ phil1ray's Profile: http://www.excelforum.com/member.php...fo&userid=6416 View this thread: http://www.excelforum.com/showthread...hreadid=510909 |
#2
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
I don't know the web site, but are you trying to generate a list (hyperlinks)
of the sheets in your workbook? You could do that with (or something like) the following (which begins the list in the active cell - be sure not to overwrite anything you need): Sub TOC() Dim i As Long Dim Counter As Long Counter = 0 For i = 1 To Sheets.Count If Sheets(i).Name < ActiveSheet.Name Then ActiveSheet.Hyperlinks.Add Anchor:=ActiveCell.Offset(Counter, 0), _ Address:="", SubAddress:=Sheets(i).Name & "!A1", _ TextToDisplay:=Sheets(i).Name Counter = Counter + 1 End If Next i End Sub "phil1ray" wrote: Over a year ago a member of this forum directed me to a web sight with the code for a macro to build a table of contents in a work book. I have since deleted the macro and now I need it again. Can anyone help. Thanks -- phil1ray ------------------------------------------------------------------------ phil1ray's Profile: http://www.excelforum.com/member.php...fo&userid=6416 View this thread: http://www.excelforum.com/showthread...hreadid=510909 |
#3
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
I bet it was David McRitchie's site:
http://www.mvps.org/dmcritchie/excel/buildtoc.htm phil1ray wrote: Over a year ago a member of this forum directed me to a web sight with the code for a macro to build a table of contents in a work book. I have since deleted the macro and now I need it again. Can anyone help. Thanks -- phil1ray ------------------------------------------------------------------------ phil1ray's Profile: http://www.excelforum.com/member.php...fo&userid=6416 View this thread: http://www.excelforum.com/showthread...hreadid=510909 -- Dave Peterson |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
building a web site | Excel Discussion (Misc queries) | |||
breakdown of buying land and building a home costs | Excel Discussion (Misc queries) | |||
a template for tracking house building costs | Excel Discussion (Misc queries) | |||
I need a template to track expense + VAT when building a house | Excel Discussion (Misc queries) | |||
building invoice - strategy advice | Excel Discussion (Misc queries) |