Trying to add hyperlinks into my worksheet, but can't get passes this run-time error 438
Code
Option Explicit
Sub HyperLink()
Dim ws As Worksheet
Dim rng As Range
Dim cell As Range
Set ws = Worksheets("DATA")
[B]Set rng = Range(Range("I2"), Range("I2").End(xlDown)).Selection [/B]this is where the error is happening
For Each rng In ws
With rng
.Hyperlinks.Add Anchor:=Cells(cell.Column + 1), _
Address:="http://example.microsoft.com", _
ScreenTip:="Microsoft Web Site", _
TextToDisplay:="Microsoft"
End With
Next rng
End Sub
Display More