So I have this macro that was working fine until today. It is supposed to sort the worksheet names into a list in column A, all of which should be hyperlinked. This is it -
Sub ListSheets()
Dim ws As Worksheet
Dim x As Integer
x = 1
Sheets("DIRECTORY").Range("A:A").Clear
For Each ws In Worksheets
If ws.Name <> "DIRECTORY" Then
Sheets("DIRECTORY").Cells(x, 1).Select
ActiveSheet.Hyperlinks.Add _
Anchor:=Selection, Address:="", _
SubAddress:=ws.Name & "!A1", TextToDisplay:=ws.Name
x = x + 1
End If
Next ws
End Sub
Of course I don't know what I did to make this macro not work anymore. The "DIRECTORY" sheet still exists, but I did change the name of another worksheet from "TEMPLATE" to "teen TEMPLATE" and created another one called "child TEMPLATE." When I click to edit the hyperlink, I can connect it back to the page it should be connected to. However, when I run another macro to refresh the list and tabs, the hyperlinks stop working again.
Argh!
Bookmarks