I am inserting the following hyperlink as a formula using vba:
ActiveSheet.Range("AD" & ActiveCell.Row).Formula = "=HYPERLINK(""S:\Tasks\" & Range("C" & ActiveCell.Row).Value & "\log.txt"",""View Log"")"
This works fine, however if my value in cell C was to change then my hyperlink becomes invalid and won't work because it has retained the value of the cell at the time in which the formula was entered.
I need a way of making a dynamic reference to my cell C in the event that the value should change then my link will also change.
Can someone please show me how to do this? Thanks in advance
ActiveSheet.Range("AD" & ActiveCell.Row).FormulaR1C1 = "=HYPERLINK(""S:\Tasks\"" & RC[-27] & ""\log.txt"",""View Log"")"
do what you want? - Axel Richter