Excel内のハイパーリンク置換マクロ

つぶやき
スポンサーリンク
Private Sub cancelButton_Click()
    Me.Hide
    Me.Tag = vbCancel
End Sub


Private Sub execButton_Click()
 Dim h As Hyperlink
    For Each h In ActiveSheet.Hyperlinks
        h.Address = Replace(h.Address, Me.TextBefore.Value, Me.TextAfter.Value)
        h.SubAddress = Replace(h.SubAddress, Me.TextBefore.Value, Me.TextAfter.Value)
    Next h
    Me.Hide
    Me.Tag = vbOK
End Sub
Sub replaceLink()
    replaceLinkForm.Show
End Sub

コメント