VBA清空所有超链接

2019-07-22 14:59:55 浏览数 (1)

代码语言:javascript复制
VBA删除所有超链接:
    Sub Delete_Hyperlinks()
    On Error GoTo Tuichu
    Dim HyperlinkNumber As Integer
    Dim WorkSheetNumber As Integer
    Dim i As Integer
    WorkSheetNumber = Worksheets.Count
    For i = 1 To WorkSheetNumber
        HyperlinkNumber = Worksheets(i).Hyperlinks.Count
        For j = 1 To HyperlinkNumber
            Worksheets(i).Hyperlinks.Delete
        Next j
    Next i
    Tuichu:
    End SUB
vba

0 人点赞