I have workbookA, I run a macro which copy information from workbookA to workbookB. I want to add a hyperlink for every row (so I can find where this row is in workbookA). But I can't get it to work. In the same workbook but different sheets it works.
My code:
Set rw = sh.rows(i)
Set targetCell = rw.Cells(1, "R")
wbB.Sheets("Sheet1").Hyperlinks.add Anchor:=rng.EntireRow.Cells(1, "A"), Address:="", SubAddress:="='" & sh.name & "'!" & targetCell.Address & "", TextToDisplay:="Link"
Tx!