davedave24
Programmer
Hi, I have a button on multiple pages that I need to place a hyperlink back to the page it came from. The hyperlink will be placed on the first worksheet, called Overview.
Code:
Dim TargetSheet As Worksheet
[highlight #73D216]I've tried both of these and other things but none work[/highlight]
[COLOR=#4E9A06]Set TargetSheet = ActiveSheet.Name[/color]
[COLOR=#4E9A06]Set TargetSheet = ActiveSheet.Range("C2")[/color] 'C2 also contains the name of the sheet
With ThisWorkbook.Worksheets("Overview")
.Select
.Range("B4").Select
Selection.End(xlDown).Offset(1, 0).Select
[COLOR=#EF2929]ActiveSheet.Hyperlinks.Add Anchor:=Selection, Address:="", SubAddress:=TargetSheet[/color]
End with