Removing Multiple Hyperlinks

  • Thread starter Thread starter john8b
  • Start date Start date
J

john8b

I have worked out how to remove a hyperlink from a single cell, but ho
do you remove them from complete columns, as I have 80,000 to remove??

Joh
 
Select your range (ctrl-a (twice in xl2003) to select all the cells on the
worksheet.

Then
alt-f11 to get to the VBE.
ctrl-g to see the immediate window

Then type this and hit enter:

selection.hyperlinks.delete

You could even create a macro that you could run:

sub removeAllLinksFromSelection()
selection.hyperlinks.delete
end sub
 
Thanks Dave, it worked fine. where do you type in the following;

sub removeAllLinksFromSelection()
selection.hyperlinks.delete
end sub

I have gone Tools>Macro>Record new macro but I am unable to type in
the full string above in the top box, what am I doing wrong???
 
John

Copy the code from Dave.

With your workbook open, hit ALT + F11 then CRTL + r

You are now in the Project Explorer window of the Visual Basic Editor.

Find your workbook/project(by name) and right-click on it.

From the menu pick Insert>Module

Paste the code in there.

ALT + Q to return to Excel window.

Select your range of data with the hyperlinks then ALT + F8

Run the removeall....macro from there.

Gord Dibben Excel MVP
 
Well I would think that I should see the VBA code for the
hyperlink somewhere, so that I could change it if needed.
I can highlight it with the mouse and it shows where it
is pointing to, but how can I edit it?

thank you for the reply

RK
 
In my experience, there usually isn't any code associated with the hyperlink.

You can get to it by Selecting the cell with the link

1. rightclick and chose edit hyperlink
2. insert hyperlink
or
3. ctrl-k
 
In VBA, you can 'see' the address of the hyperlink using:

Range(MyRange).Hyperlinks.Item(1).Address


Olly
 
Back
Top