Trying to add multiple cell to cell hyperlinks across different sheets of the same workbook.
I think I need to use object variables so it will work with many sheets/ranges.
something like:
Code
' putting link on sheet1("a1") to sheet2("a1")
Dim Sh1 As Worksheet
Dim sh2 As Worksheet
Set Sh1 = Sheet1
Set sh2 = Sheet2
dim rng1 as range
dim rng2 as range
set rng1 = sh1.range("a1")
set rng2 = sh2.range("a1")
with sh1.hyperlinks.add
.anchor = rng1
.address=""
.SubAddress = rng2
.TextToDisplay'="link"
end with
Display More
trying to avoid using .Selection or .Active anything.
.