Dim sh As Worksheet
Dim iLastRow As Long
I open my workbook and run this code, but it only executes on the worksheet my cursor is on. How do I get it to execute for all sheets?
Dim sURL As String
Dim i As Long
For Each sh In ThisWorkbook.Worksheets
With sh
iLastRow = .Cells(.Rows.Count, "A").End(xlUp).Row
For i = 1 To iLastRow
sURL = .Cells(i, "A").Value
If Left(sURL, 7) <> "http://" Then
sURL = "http://" & sURL
End If
.Hyperlinks.Add Anchor:=.Cells(i, "A"), Address:=sURL
Next i
End With
Next sh