Post-Admin:
Date: 2006年 09月 20日
Subject:
続々・勝手にハイパーリンクにしない
Sub Worksheet_Change(ByVal target As Range)
Dim m, ctl1, ctl2
Dim s As String
Dim r As Range
For Each ctl1 In CommandBars("Worksheet Menu Bar").Controls
For Each ctl2 In ctl1.Controls
s = ctl2.Caption
If Left(s, 4) = "元に戻す" And Right(s, 7) = "ハイパーリンク" Then
Set r = ActiveCell
Application.Undo
r.Select
GoTo skp
End If
Next
Next
skp:
target.Hyperlinks.Delete
End Sub
やっぱりUndoは危険?でも書式を残したいしな・・・