Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Removing hyperlink without removing the font settings /border sett
The below code removes hyperlinks
Sub ZapHyperlinks() Cells.Hyperlinks.Delete End Sub However it also removes the formatting(color/border) of the cell . Any idea on how to protect the format of the cell |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Removing hyperlink without removing the font settings /border sett
Maybe something like this:
Sub ZapHyperlinks() Set sh = ActiveSheet ActiveSheet.Copy After:=Worksheets(Worksheets.Count) Set sh1 = ActiveSheet sh.Activate Set r = Selection Cells.Hyperlinks.Delete sh1.Cells.Copy sh.Cells.PasteSpecial xlFormats r.Select Application.DisplayAlerts = False sh1.Delete Application.DisplayAlerts = True End Sub -- Regards, Tom Ogilvy "San" wrote: The below code removes hyperlinks Sub ZapHyperlinks() Cells.Hyperlinks.Delete End Sub However it also removes the formatting(color/border) of the cell . Any idea on how to protect the format of the cell |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Removing hyperlink without removing the font settings /border sett
Another way:
Sub hyper_be_gone() For Each r In ActiveSheet.UsedRange If r.Hyperlinks.Count 0 Then r.ClearContents End If Next End Sub -- Gary''s Student - gsnu200747 "San" wrote: The below code removes hyperlinks Sub ZapHyperlinks() Cells.Hyperlinks.Delete End Sub However it also removes the formatting(color/border) of the cell . Any idea on how to protect the format of the cell |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
removing more than one hyperlink | Excel Discussion (Misc queries) | |||
Removing Hyperlink | Excel Worksheet Functions | |||
Removing Mail to: hyperlink option | Excel Discussion (Misc queries) | |||
Removing Hyperlink | Excel Discussion (Misc queries) | |||
Removing hyperlink | Excel Discussion (Misc queries) |