Hi
I have no knowledge of VBA so help would be great.
This code reads the tabs of the sheet, and puts them in a list on the index page, which will then update the table. Is it possible to add an additional line when a new tab is added.
could someone correct the code as I have no idea,
Also on the template tab could you add a calender date selector to add a date to a pre-selected cell.
All help would be greatly received.
Sub HyperLink_SheetsToIndex()
' Local Variables
Dim wks As Worksheet
Dim rngLinkCell As Range
Dim strSubAddress As String, strDisplayText As String
' Step 1 : Loop through all worksheets
' 1a : Clear all current hyperlinks
Worksheets("INDEX").Range("A:A").ClearContents
' 1b : Create Linked index list
For Each wks In ActiveWorkbook.Worksheets
Set rngLinkCell = Worksheets("INDEX").Range("B65536").End(xlUp)
If Worksheets("INDEX").Range("A10") = "" Then
Set rngLinkCell = Worksheets("INDEX").Range("A10")
End If
If rngLinkCell <> = "" Then Set rngLinkCell = rngLinkCell.Offset(1, 0)
strSubAddress = "'" & wks.Name & "'!A1"
strDisplayText = "HyperLink : " & wks.Name
Worksheets("INDEX").Hyperlinks.Add Anchor:=rngLinkCell, Address:="", SubAddress:=strSubAddress, TextToDisplay:=strDisplayText
Next wks
End Sub
Bookmarks