Forum Discussion
Phil_Turton
May 26, 2019Copper Contributor
Using cell value to link to a different worksheet
Fairly straightforward question, hopefully. Does anyone know how to use the value of a cell to link to another worksheet in the same workbook, so if the value of the cell changes, the formula usi...
Berndvbatanker
May 26, 2019Iron Contributor
Hi Phil,
you can do this with worksheet_change event. See attached file.
Private Sub Worksheet_Change(ByVal Target As Range)
With ActiveSheet
.Range("A1").Hyperlinks.Delete
.Hyperlinks.Add Anchor:=.Range("A1"), Address:="", SubAddress:= _
.Range("A1").Value & "!A1", TextToDisplay:=.Range("A1").Value
End With
End Sub
Regards
Bernd
http://www.vba-Tanker.com
- Phil_TurtonMay 26, 2019Copper Contributor