View Single Post
 
Old 08-01-2023, 02:32 AM
p45cal's Avatar
p45cal p45cal is offline Windows 10 Office 2021
Expert
 
Join Date: Apr 2014
Posts: 872
p45cal has a reputation beyond reputep45cal has a reputation beyond reputep45cal has a reputation beyond reputep45cal has a reputation beyond reputep45cal has a reputation beyond reputep45cal has a reputation beyond reputep45cal has a reputation beyond reputep45cal has a reputation beyond reputep45cal has a reputation beyond reputep45cal has a reputation beyond reputep45cal has a reputation beyond repute
Default

Change to:
Code:
ActiveSheet.Hyperlinks.Add Anchor:=Selection, Address:="", SubAddress:="'" & Selection.Value & "'!A1"
but you could try this instead:
Code:
Sub FShyeperlink()
Dim cll As Range
'On Error Resume Next' only use this if you need it.
For Each cll In Selection.Cells
  cll.Hyperlinks.Delete
  cll.Parent.Hyperlinks.Add Anchor:=cll, Address:="", SubAddress:="'" & cll.Value & "'!A1"
Next cll
End Sub
Reply With Quote