Dear Users,
I have done this macro to make hyperlinks to sheets, which have color tabs different from the default ones, but I have solved this with the confusing activecell.hyperlink formula =" and written bellow.
Moreover, looking into the hyperlink object, how could I rewrite the hyperlink macro without using the formula way? Is there anyone here expert on this object?
I have done this macro to make hyperlinks to sheets, which have color tabs different from the default ones, but I have solved this with the confusing activecell.hyperlink formula =" and written bellow.
Code:
Dim ws2 As Long
For ws2 = 1 To ActiveWorkbook.Worksheets.Count
If Worksheets(ws2).Tab.ColorIndex <> xlColorIndexNone Then
ws3 = Sheets(ws2).Name
ActiveCell.Offset(1, 0).Range("A1").Select
ActiveCell.Formula = "=HYPERLINK(""#""&CELL(""address"",'" & ws3 & "'!A1)," _
& """" & ws3 & """)"
End If
Next ws2
Moreover, looking into the hyperlink object, how could I rewrite the hyperlink macro without using the formula way? Is there anyone here expert on this object?