Good morning!
I have the following code that is supposed to loop through all cells in the named range DateColumn and create hyperlinks that point to themselves.
The macro works without error but every cell's link target is the first cell of the named range. I need each cell's link target to be itself.
I have the following code that is supposed to loop through all cells in the named range DateColumn and create hyperlinks that point to themselves.
The macro works without error but every cell's link target is the first cell of the named range. I need each cell's link target to be itself.
VBA Code:
Sub CreateLinks2()
Dim c As Range
For Each c In Range("DateColumn")
ActiveSheet.Hyperlinks.Add Anchor:=Selection, Address:="", SubAddress:= _
"B" & ActiveCell.Row + , ScreenTip:="Click To Change Date"
Next
End Sub