Excel关于超级链接的宏命令

Sub 替换超级链接地址()
Dim h
Dim str1$
str1 = "D:/Personal/My Documents/"
For Each h In Worksheets(1).Hyperlinks
    If InStr(h.Name, str1) <> 0 Then h.Address = "" & Replace(h.Name, str1, "")
Next

End Sub

Sub 取消所有超级链接()
    ActiveSheet.Hyperlinks.Delete
End Sub

posted @ 2008-08-07 17:22  网事  阅读(331)  评论(0编辑  收藏  举报