gkisystems
Board Regular
- Joined
- Apr 20, 2012
- Messages
- 76
I have a macro that inserts a new tab in my workbook and lists the name of all the other tabs within the same workbook. I like using this macro to create a summary sheet of all the tabs within my workbook, however how do I modify this macro so that each of the tab names on my summary sheet turn into blue hyperlinks to each of the tabs (go to cell A1 in each tab)?
Here is the existing macro I have now:
Sub SheetNames()
'Adds a new worksheet
'Inserts all worksheet names on the new sheet
Dim newsheet
Set newsheet = Sheets.Add(After:=Sheets(Worksheets.Count), Count:=1, Type:=xlWorksheet)
newsheet.Name = "SheetNames"
Columns(1).Insert
For i = 1 To Sheets.Count
Cells(i, 1) = Sheets(i).Name
Next i
End Sub
Here is the existing macro I have now:
Sub SheetNames()
'Adds a new worksheet
'Inserts all worksheet names on the new sheet
Dim newsheet
Set newsheet = Sheets.Add(After:=Sheets(Worksheets.Count), Count:=1, Type:=xlWorksheet)
newsheet.Name = "SheetNames"
Columns(1).Insert
For i = 1 To Sheets.Count
Cells(i, 1) = Sheets(i).Name
Next i
End Sub