Public Sub 4_156()
Dim myRange As Range
Dim myHyps As Hyperlinks
Set myRange = Range("A1") '指定任意的单元格
Set myHyps = myRange.Hyperlinks
With myHyps
.Delete '删除已经存在的超连接
'插入指向本工作簿外部的超连接
.Add Anchor:=myRange, Address:="C:\ index.html", _
ScreenTip:="单击将开始浏览搜狐网站", _
TextToDisplay:="http://www.sohu.com/"
End With
Set myHyps = Nothing
Set myRange = Nothing
End Sub
Dim myRange As Range
Dim myHyps As Hyperlinks
Set myRange = Range("A1") '指定任意的单元格
Set myHyps = myRange.Hyperlinks
With myHyps
.Delete '删除已经存在的超连接
'插入指向本工作簿外部的超连接
.Add Anchor:=myRange, Address:="C:\ index.html", _
ScreenTip:="单击将开始浏览搜狐网站", _
TextToDisplay:="http://www.sohu.com/"
End With
Set myHyps = Nothing
Set myRange = Nothing
End Sub