ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   remove hyperlinks in a worksheet all in the same time (https://www.excelbanter.com/excel-worksheet-functions/179402-remove-hyperlinks-worksheet-all-same-time.html)

Kent

remove hyperlinks in a worksheet all in the same time
 
Dear all,

I have got some hyperlinks in my excel worksheet which may be removed and
replaced by characters one by one. HOw can these hyperlinks be removed all
in the same time?


Thanks you



Gary''s Student

remove hyperlinks in a worksheet all in the same time
 
Try this little macro:

Sub HyperBeGone()
For Each r In ActiveSheet.UsedRange
If r.Hyperlinks.Count 0 Then
r.Clear
End If
Next
End Sub

--
Gary''s Student - gsnu2007f


"Kent" wrote:

Dear all,

I have got some hyperlinks in my excel worksheet which may be removed and
replaced by characters one by one. HOw can these hyperlinks be removed all
in the same time?


Thanks you




Kent

remove hyperlinks in a worksheet all in the same time
 
Thank you Gary, what I need is only to remove the hyperlink, but not delete
the content. Any new idea please?


Kent



"Gary''s Student" ...
Try this little macro:

Sub HyperBeGone()
For Each r In ActiveSheet.UsedRange
If r.Hyperlinks.Count 0 Then
r.Clear
End If
Next
End Sub

--
Gary''s Student - gsnu2007f


"Kent" wrote:

Dear all,

I have got some hyperlinks in my excel worksheet which may be removed and
replaced by characters one by one. HOw can these hyperlinks be removed
all
in the same time?


Thanks you






Dave Peterson

remove hyperlinks in a worksheet all in the same time
 
select your range to clean
alt-f11 (to see the VBE)
ctrl-g (to see the immediate window)

type this and hit enter
selection.hyperlinks.delete

And then close this window and go back to excel.

Kent wrote:

Dear all,

I have got some hyperlinks in my excel worksheet which may be removed and
replaced by characters one by one. HOw can these hyperlinks be removed all
in the same time?

Thanks you


--

Dave Peterson

Dave Peterson

remove hyperlinks in a worksheet all in the same time
 
I don't think I'd use r.clear.

That'll clean up way more than just the hyperlink.

Gary''s Student wrote:

Try this little macro:

Sub HyperBeGone()
For Each r In ActiveSheet.UsedRange
If r.Hyperlinks.Count 0 Then
r.Clear
End If
Next
End Sub

--
Gary''s Student - gsnu2007f

"Kent" wrote:

Dear all,

I have got some hyperlinks in my excel worksheet which may be removed and
replaced by characters one by one. HOw can these hyperlinks be removed all
in the same time?


Thanks you




--

Dave Peterson

Kent

remove hyperlinks in a worksheet all in the same time
 
Dear Dave,

I can't follow your instruction starting from "ctrl-g (to see the immediate
window)"
and where should I type "selection.hyperlinks.delete"?



"Dave Peterson"
...
select your range to clean
alt-f11 (to see the VBE)
ctrl-g (to see the immediate window)

type this and hit enter
selection.hyperlinks.delete

And then close this window and go back to excel.

Kent wrote:

Dear all,

I have got some hyperlinks in my excel worksheet which may be removed and
replaced by characters one by one. HOw can these hyperlinks be removed
all
in the same time?

Thanks you


--

Dave Peterson




Dave Peterson

remove hyperlinks in a worksheet all in the same time
 
Use alt-f11 to open the VBE.
Hit control-g to see the immediate window
(Or use View|Immediate Window)

type or paste that "selection.hyperlinks.delete" into that immediate window.

Kent wrote:

Dear Dave,

I can't follow your instruction starting from "ctrl-g (to see the immediate
window)"
and where should I type "selection.hyperlinks.delete"?

"Dave Peterson"
...
select your range to clean
alt-f11 (to see the VBE)
ctrl-g (to see the immediate window)

type this and hit enter
selection.hyperlinks.delete

And then close this window and go back to excel.

Kent wrote:

Dear all,

I have got some hyperlinks in my excel worksheet which may be removed and
replaced by characters one by one. HOw can these hyperlinks be removed
all
in the same time?

Thanks you


--

Dave Peterson


--

Dave Peterson

Kent

remove hyperlinks in a worksheet all in the same time
 
Thank you Dave, I've done it.




"Dave Peterson"
...
Use alt-f11 to open the VBE.
Hit control-g to see the immediate window
(Or use View|Immediate Window)

type or paste that "selection.hyperlinks.delete" into that immediate
window.

Kent wrote:

Dear Dave,

I can't follow your instruction starting from "ctrl-g (to see the
immediate
window)"
and where should I type "selection.hyperlinks.delete"?

"Dave Peterson"
...
select your range to clean
alt-f11 (to see the VBE)
ctrl-g (to see the immediate window)

type this and hit enter
selection.hyperlinks.delete

And then close this window and go back to excel.

Kent wrote:

Dear all,

I have got some hyperlinks in my excel worksheet which may be removed
and
replaced by characters one by one. HOw can these hyperlinks be removed
all
in the same time?

Thanks you

--

Dave Peterson


--

Dave Peterson





All times are GMT +1. The time now is 03:10 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com