I a found a macro that will run when a hyperlink is selected. however, the problem is that if i have more than one hyperlink it will only work on the macro that was there first. Here is my example below:
"Private Sub Worksheet_Asset_Value(ByVal Target As Hyperlink)
'Check if the Target Address is same as you have given
'In the above example i have taken A4 Cell, so I am
'Comparing this with $A$4
If Target.Range.Address = "$A$5:$A$7" Then
Call Asset_Value
Exit Sub
End If
End Sub
Private Sub Worksheet_FollowHyperlink(ByVal Target As Hyperlink)
'Check if the Target Address is same as you have given
'In the above example i have taken A4 Cell, so I am
'Comparing this with $A$4
If Target.Range.Address = "$A$8:$A$9" Then
Call Negatives
Exit Sub
End If
End Sub"
As you can see, i want to run two different macros by clicking on 2 different cells (A5:a7) and (a8:a9). any help? potentially combine the cells to call different macros depending on what cell i have selected? Thanks for the help.
"Private Sub Worksheet_Asset_Value(ByVal Target As Hyperlink)
'Check if the Target Address is same as you have given
'In the above example i have taken A4 Cell, so I am
'Comparing this with $A$4
If Target.Range.Address = "$A$5:$A$7" Then
Call Asset_Value
Exit Sub
End If
End Sub
Private Sub Worksheet_FollowHyperlink(ByVal Target As Hyperlink)
'Check if the Target Address is same as you have given
'In the above example i have taken A4 Cell, so I am
'Comparing this with $A$4
If Target.Range.Address = "$A$8:$A$9" Then
Call Negatives
Exit Sub
End If
End Sub"
As you can see, i want to run two different macros by clicking on 2 different cells (A5:a7) and (a8:a9). any help? potentially combine the cells to call different macros depending on what cell i have selected? Thanks for the help.