scottcolbury
New Member
- Joined
- Dec 6, 2005
- Messages
- 45
Hi,
I have some legacy workbooks with embedded hyperlinks that I need to get rid of.
I know how to remove the links, but when doing so Excel resets the number formatting to general, removes colors, bold, italics, etc, etc. I need to retain this formatting.
I tried copying the cell to then use paste special:formatting, but that does not work.
Here is version of my code.
thanks
s_c
I have some legacy workbooks with embedded hyperlinks that I need to get rid of.
I know how to remove the links, but when doing so Excel resets the number formatting to general, removes colors, bold, italics, etc, etc. I need to retain this formatting.
I tried copying the cell to then use paste special:formatting, but that does not work.
Here is version of my code.
Code:
With ActiveSheet
LastRow = .Cells(65536, 2).End(xlUp).Row
'test all cells with visible data
For x = 1 To LastRow
For y = 1 To 256
Application.StatusBar = "x = " & x & " of " & LastRow & " : y = " & y
If .Cells(x, y).Hyperlinks.Count > 0 Then
.Cells(x, y).Hyperlinks(1).Delete
End If
Next y
Next x
End With
thanks
s_c