I manually recorded a hyperlink macro and then modification it to work as seen No. 1 below.
I tried to modify it to work with "With" (as seen in No. 2) but it keeps putting the address in A1?
With is better the 1 or 2?
1. Range("A4").Select
ActiveSheet.Hyperlinks.Add Anchor:=Selection, Address:= _
"'https://wwwxxxxxxxxxxxxxxxxxx", _
TextToDisplay:="LRS Web Site (address is https://wwwxxxxxxxxxxxxxxxxxxxxxxx)"
2. With .[A4]
ActiveSheet.Hyperlinks.Add Anchor:=Selection, Address:= _
"'https://wwwxxxxxxxxxxxxxxxxxxxxxx", _
TextToDisplay:="LRS Web Site (address is https://wwwxxxxxxxxxxxxxxxxxxxx)"
End With
I tried to modify it to work with "With" (as seen in No. 2) but it keeps putting the address in A1?
With is better the 1 or 2?
1. Range("A4").Select
ActiveSheet.Hyperlinks.Add Anchor:=Selection, Address:= _
"'https://wwwxxxxxxxxxxxxxxxxxx", _
TextToDisplay:="LRS Web Site (address is https://wwwxxxxxxxxxxxxxxxxxxxxxxx)"
2. With .[A4]
ActiveSheet.Hyperlinks.Add Anchor:=Selection, Address:= _
"'https://wwwxxxxxxxxxxxxxxxxxxxxxx", _
TextToDisplay:="LRS Web Site (address is https://wwwxxxxxxxxxxxxxxxxxxxx)"
End With