Hi All, I would really appreciate some help with a macro to hyperlink a cell on Sheet 1 to a cell on Sheet 2. Column A on Sheet 1 contains the cell reference to Sheet 2 and Column B, Sheet 1 is where I want the the hypelink to appear. I've had some minor success with the following macro...
Sub Hlink()
Dim strMyValue As String
strMyValue = ActiveCell.Offset(0, -1).Value
ActiveSheet.Hyperlinks.Add Anchor:=Selection, Address:="", SubAddress:= _
"'Sheet 2' strMyValue"
End Sub
...but the resulting hyperlink returns 'Refernce is not valid' when clicked. It appears that the ActiveSheet.Hyperlinks.Add command is not correctly formated to use the value of strMyValue.
I'm a real newbie to this stuff so please let me know if you need more info.
Thanks in advance
Sub Hlink()
Dim strMyValue As String
strMyValue = ActiveCell.Offset(0, -1).Value
ActiveSheet.Hyperlinks.Add Anchor:=Selection, Address:="", SubAddress:= _
"'Sheet 2' strMyValue"
End Sub
...but the resulting hyperlink returns 'Refernce is not valid' when clicked. It appears that the ActiveSheet.Hyperlinks.Add command is not correctly formated to use the value of strMyValue.
I'm a real newbie to this stuff so please let me know if you need more info.
Thanks in advance