I have been trying to get a macro insert a dynamic hyperlink for a couple hours now and cannot seem to get the syntax correct.
I need to make my macro insert a hyperlink into rLinkCell that points to rTargetCell in shTargetSheet, use the label or display text stLinkName and have the Screen tip stTip.
I have gotten this far:
shCurSheet.Hyperlinks.Add Anchor:=rLinkCell, _
Address:="", _
SubAddress:=shTargetSheet.Name & "!" & rTargetCell.Address, _
ScreenTip:=stTip, _
TextToDisplay:=stLinkName
It makes the link perfectly and all the displays are fine, however when I click it I get an error saying Refrence is not valid.
I am certain it is something simple, what am I doing wrong?