Excel批量打开URL
一个小伙伴想要在Excel中批量打开一批网址。果断满足了他。
Sub GoInternet()
Dim item As Range
If TypeName(Selection) <> "Range" Then
Exit Sub
End If
Dim Url As String
For Each item In Selection
If InStr(item.Text, "http") < 1 Then
Url = "http://" & item.Text
End If
ActiveSheet.Hyperlinks.Add item, Url
item.Hyperlinks(1).Follow NewWindow:=False, AddHistory:=True
Next item
End Sub
上面的代码很好理解。复制到Excel中,选中链接,运行即可。