J
jjk
Hi,
I use the following sub to delete the mail to hyperlinks that appear
for any email addresses entered in the sheet.
Public Sub RemoveHyperlinks(rng As Range)
Dim h As Hyperlink
For Each h In rng.Hyperlinks
h.Delete
Next h
End Sub
When the sheet is not protected it executes fine.
When the sheet is protected and the cells are locked the method fails
as expected.
But if the sheet is protected and the cells are unlocked then the
method does not remove the hyperlinks. In fact when I went into debug
mode and watched 'rng', it reported rng with Hyperlinks.Count=0 .
After this method the sheets hyperlink part is in a strange state. It
does not create hyperlinks anymore (yippee), even when you remove the
protection. But I am guessing this is an invalid state and could mess
up the rest of the execution.
Any explanations?
Thanks and regards,
Jayant
I use the following sub to delete the mail to hyperlinks that appear
for any email addresses entered in the sheet.
Public Sub RemoveHyperlinks(rng As Range)
Dim h As Hyperlink
For Each h In rng.Hyperlinks
h.Delete
Next h
End Sub
When the sheet is not protected it executes fine.
When the sheet is protected and the cells are locked the method fails
as expected.
But if the sheet is protected and the cells are unlocked then the
method does not remove the hyperlinks. In fact when I went into debug
mode and watched 'rng', it reported rng with Hyperlinks.Count=0 .
After this method the sheets hyperlink part is in a strange state. It
does not create hyperlinks anymore (yippee), even when you remove the
protection. But I am guessing this is an invalid state and could mess
up the rest of the execution.
Any explanations?
Thanks and regards,
Jayant