Jack O Macro
New Member
- Joined
- Mar 21, 2011
- Messages
- 2
For years I have used the following macro to hyperlink multiple www.anyurlon theweb.com addresses.
For some reason the hyperlink seems to be busted. It seems to hyperlink ok but it does not put in the http:// and thus when I click on the cell I get a "cannot open the specified file" error. So I end up having to 'right-click' and insert the http:// by hand then it will work.
I think my virus software may have damaged the macro, can you review the macro and tell me how to fix it??
Sub MakeHyperlinks()
Dim cell As Range
For Each cell In Intersect(Selection, _
Selection.SpecialCells(xlConstants, xlTextValues))
With Worksheets(1)
.Hyperlinks.Add Anchor:=cell, _
Address:=cell.Value, _
ScreenTip:=cell.Value, _
TextToDisplay:=cell.Value
End With
Next cell
End Sub
For some reason the hyperlink seems to be busted. It seems to hyperlink ok but it does not put in the http:// and thus when I click on the cell I get a "cannot open the specified file" error. So I end up having to 'right-click' and insert the http:// by hand then it will work.
I think my virus software may have damaged the macro, can you review the macro and tell me how to fix it??
Sub MakeHyperlinks()
Dim cell As Range
For Each cell In Intersect(Selection, _
Selection.SpecialCells(xlConstants, xlTextValues))
With Worksheets(1)
.Hyperlinks.Add Anchor:=cell, _
Address:=cell.Value, _
ScreenTip:=cell.Value, _
TextToDisplay:=cell.Value
End With
Next cell
End Sub