Is there away to make the "=Hyperlink(Path,Name)" formula, within Excel, trigger a macro when clicked?
I attempted to use the following code:
Private Sub Worksheet_FollowHyperlink(ByVal Target As Hyperlink)
If WithinRange(Target.Range.Address ,"CustomerNameList")=True Then
'run code
Exit Sub
End If
End Sub
This works perfectly for traditional hyperlinks but does not appear to work with the hyperlink formula. Ultimately, I would like a way to modify the above code to make it work with the hyperlink function.
Additionally, this workbook is not static. New rows are added from the top, shift down. Using the hyperlink formula has made my other processes much simpler and I would rather not have to write code that hardcodes a hyperlink each time an item is added or a name is changed. I also would prefer to not use an Onclick event with the cells within that range as the user may just want to modify the customer name and not follow the hyperlink.
I realize this is a lot of conditions and this just may not be possible but any suggestions would be appreciated.