#「EXCELのプロ」ではありませんが。。。
Sub macro1()
Dim myLnk As Range
For Each myLnk In Selection
On Error Resume Next
ActiveWorkbook.FollowHyperlink myLnk.Text
On Error GoTo 0
Next
End Sub
でもできそうですが、PCのスペックやインターネットキャッシュの状態によっては、意図しただけのウィンドウが開かないようですので、以下でいかがでしょうか?
Sub Macro2()
Dim objIE As Object
Dim myLnk As Range
Set objIE = CreateObject("InternetExplorer.Application")
objIE.Visible = True
For Each myLnk In Selection
objIE.navigate2 myLnk.Text, 2048
Next
objIE.Quit
Set objIE = Nothing
End Sub
とりあえず簡単のため、「URL」は「httpから始まる文字列」とします。
sub macro1()
dim c as range
dim c0 as string
set c = cells.find(what:="http*", lookin:=xlvalues, lookat:=xlpart)
if c is nothing then exit sub
c0 = c.address
do
activeworkbook.followhyperlink address:=c.value
set c = cells.findnext(c)
loop until c.address = c0
end sub
#そこに「URL」が(文字列として)あるのですから。わざわざハイパーリンクを埋め直すとか回り道せず、直接そのURLを開きます。
お礼
お礼がおくれました。とても参考になりました。