Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Is there a way, using VBA code, to remove a hyperlink from a cell, while
retaining the cell text content? Thanks, Keith |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Sub hypergone()
Dim r As Range For Each r In Selection r.Hyperlinks.Delete Next End Sub Try this. On my machine the link is gone, but the text lingers on. -- Gary's Student "keithb" wrote: Is there a way, using VBA code, to remove a hyperlink from a cell, while retaining the cell text content? Thanks, Keith |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi Gary's Student,
Try this. On my machine the link is gone, but the text lingers on. Try adding an additional line: Sub hypergone() Dim r As Range For Each r In Selection r.Hyperlinks.Delete r.Clear Next End Sub --- Regards, Norman "Gary's Student" wrote in message ... Sub hypergone() Dim r As Range For Each r In Selection r.Hyperlinks.Delete Next End Sub Try this. On my machine the link is gone, but the text lingers on. -- Gary's Student "keithb" wrote: Is there a way, using VBA code, to remove a hyperlink from a cell, while retaining the cell text content? Thanks, Keith |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi Gary,
Please ignore my suggestion. I missed the OP's requirement to *retain* the text! My apologies. --- Regards, Norman "Norman Jones" wrote in message ... Hi Gary's Student, Try this. On my machine the link is gone, but the text lingers on. Try adding an additional line: Sub hypergone() Dim r As Range For Each r In Selection r.Hyperlinks.Delete r.Clear Next End Sub --- Regards, Norman "Gary's Student" wrote in message ... Sub hypergone() Dim r As Range For Each r In Selection r.Hyperlinks.Delete Next End Sub Try this. On my machine the link is gone, but the text lingers on. -- Gary's Student "keithb" wrote: Is there a way, using VBA code, to remove a hyperlink from a cell, while retaining the cell text content? Thanks, Keith |
#5
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Thanks for the help. One related question:
What properties of a Range can I set so that text within the range is not interpreted as a URL in the first place? Thanks again, Keith "Norman Jones" wrote in message ... Hi Gary, Please ignore my suggestion. I missed the OP's requirement to *retain* the text! My apologies. --- Regards, Norman "Norman Jones" wrote in message ... Hi Gary's Student, Try this. On my machine the link is gone, but the text lingers on. Try adding an additional line: Sub hypergone() Dim r As Range For Each r In Selection r.Hyperlinks.Delete r.Clear Next End Sub --- Regards, Norman "Gary's Student" wrote in message ... Sub hypergone() Dim r As Range For Each r In Selection r.Hyperlinks.Delete Next End Sub Try this. On my machine the link is gone, but the text lingers on. -- Gary's Student "keithb" wrote: Is there a way, using VBA code, to remove a hyperlink from a cell, while retaining the cell text content? Thanks, Keith |
#6
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Why, that should retain the text.
or just Activesheet.Hyperlinks.delete I believe will also do it. -- Regards, Tom Ogilvy "Norman Jones" wrote in message ... Hi Gary, Please ignore my suggestion. I missed the OP's requirement to *retain* the text! My apologies. --- Regards, Norman "Norman Jones" wrote in message ... Hi Gary's Student, Try this. On my machine the link is gone, but the text lingers on. Try adding an additional line: Sub hypergone() Dim r As Range For Each r In Selection r.Hyperlinks.Delete r.Clear Next End Sub --- Regards, Norman "Gary's Student" wrote in message ... Sub hypergone() Dim r As Range For Each r In Selection r.Hyperlinks.Delete Next End Sub Try this. On my machine the link is gone, but the text lingers on. -- Gary's Student "keithb" wrote: Is there a way, using VBA code, to remove a hyperlink from a cell, while retaining the cell text content? Thanks, Keith |
#7
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi Tom,
Why, that should retain the text. For me, the line r.Clear cleared the residual text and, hence, my apology. --- Regards, Norman "Tom Ogilvy" wrote in message ... Why, that should retain the text. or just Activesheet.Hyperlinks.delete I believe will also do it. -- Regards, Tom Ogilvy "Norman Jones" wrote in message ... Hi Gary, Please ignore my suggestion. I missed the OP's requirement to *retain* the text! My apologies. --- Regards, Norman "Norman Jones" wrote in message ... Hi Gary's Student, Try this. On my machine the link is gone, but the text lingers on. Try adding an additional line: Sub hypergone() Dim r As Range For Each r In Selection r.Hyperlinks.Delete r.Clear Next End Sub --- Regards, Norman "Gary's Student" wrote in message ... Sub hypergone() Dim r As Range For Each r In Selection r.Hyperlinks.Delete Next End Sub Try this. On my machine the link is gone, but the text lingers on. -- Gary's Student "keithb" wrote: Is there a way, using VBA code, to remove a hyperlink from a cell, while retaining the cell text content? Thanks, Keith |
#8
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Well than all you needed to do was say to delete that line. Everything else
was good. -- Regards Tom Ogilvy "Norman Jones" wrote in message ... Hi Tom, Why, that should retain the text. For me, the line r.Clear cleared the residual text and, hence, my apology. --- Regards, Norman "Tom Ogilvy" wrote in message ... Why, that should retain the text. or just Activesheet.Hyperlinks.delete I believe will also do it. -- Regards, Tom Ogilvy "Norman Jones" wrote in message ... Hi Gary, Please ignore my suggestion. I missed the OP's requirement to *retain* the text! My apologies. --- Regards, Norman "Norman Jones" wrote in message ... Hi Gary's Student, Try this. On my machine the link is gone, but the text lingers on. Try adding an additional line: Sub hypergone() Dim r As Range For Each r In Selection r.Hyperlinks.Delete r.Clear Next End Sub --- Regards, Norman "Gary's Student" wrote in message ... Sub hypergone() Dim r As Range For Each r In Selection r.Hyperlinks.Delete Next End Sub Try this. On my machine the link is gone, but the text lingers on. -- Gary's Student "keithb" wrote: Is there a way, using VBA code, to remove a hyperlink from a cell, while retaining the cell text content? Thanks, Keith |
#9
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi Tom,
Well than all you needed to do was say to delete that line. Everything else was good The 'good' part was Gary's Student's code. My sole contribution was the offending line - hence my apology! --- Regards, Norman "Tom Ogilvy" wrote in message ... Well than all you needed to do was say to delete that line. Everything else was good. -- Regards Tom Ogilvy "Norman Jones" wrote in message ... Hi Tom, Why, that should retain the text. For me, the line r.Clear cleared the residual text and, hence, my apology. --- Regards, Norman "Tom Ogilvy" wrote in message ... Why, that should retain the text. or just Activesheet.Hyperlinks.delete I believe will also do it. -- Regards, Tom Ogilvy "Norman Jones" wrote in message ... Hi Gary, Please ignore my suggestion. I missed the OP's requirement to *retain* the text! My apologies. --- Regards, Norman "Norman Jones" wrote in message ... Hi Gary's Student, Try this. On my machine the link is gone, but the text lingers on. Try adding an additional line: Sub hypergone() Dim r As Range For Each r In Selection r.Hyperlinks.Delete r.Clear Next End Sub --- Regards, Norman "Gary's Student" wrote in message ... Sub hypergone() Dim r As Range For Each r In Selection r.Hyperlinks.Delete Next End Sub Try this. On my machine the link is gone, but the text lingers on. -- Gary's Student "keithb" wrote: Is there a way, using VBA code, to remove a hyperlink from a cell, while retaining the cell text content? Thanks, Keith |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Remove Cell Color after Code is Deleted | Excel Discussion (Misc queries) | |||
I cannot remove a hyperlink (mail to) in a cell | Excel Worksheet Functions | |||
remove hyperlink of many cell at a time? | Excel Discussion (Misc queries) | |||
Can I remove a hyperlink without removing the color of the cell? | Excel Discussion (Misc queries) | |||
How to remove Hyperlink without changing cell format? | Excel Worksheet Functions |