Hi,
I am trying to write a code where if a user clicks on a range of hyperlinks, another sheet value gets changed to the value of the hyperlink clicked rather than the hyperlink (i believe for this the hyperlink will have to refer to itself). I have a code already which i wrote for to execute on cell selection, but i figured that the report will be more smooth if it is based on hyperlink clicking rather than cell selection criteria (creates problem with data entry):
Code
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
If Selection.Count = 1 Then
'Put in your actual range and the cell where you the text to be shown
If Not Intersect(Target, Sheets("Assets").Range("C2:C3500")) Is Nothing Then
Selection.Copy
Sheets("Asset report").Range("F2").PasteSpecial xlPasteValues
Application.CutCopyMode = False
Worksheets("Asset Report").Activate
End If
End If
If Selection.Count = 1 Then
'Put in your actual range and the cell where you the text to be shown
If Not Intersect(Target, Sheets("Assets").Range("S2:S3500")) Is Nothing Then
Selection.Copy
Sheets("Asset report").Range("F2").PasteSpecial xlPasteValues
Application.CutCopyMode = False
Worksheets("Asset Report").Activate
End If
End If
End Sub
Display More
If anyone can let me how to modify the code so that i can achieve my desired result.