I am trying to set the Hyperlink texttodisplay property in VBA to a formula to return a cell value from a different sheet using INDRECT, the code I am using is;
The formula will go into cell B6 so "R6C1" refers to A6.
But this does not return anything, the cell contains the correct link but appears empty. How can I correct the formula, ideally I would like to use Relative References. Thanks.
Code:
TextToDisplay:="=INDIRECT(""'"" & R6C1 & ""'!A1"")"
The formula will go into cell B6 so "R6C1" refers to A6.
But this does not return anything, the cell contains the correct link but appears empty. How can I correct the formula, ideally I would like to use Relative References. Thanks.
Last edited: