Hyperlink removal

  • Thread starter Thread starter Raider917
  • Start date Start date
R

Raider917

is there any way to remove all the links all at once? i copied a web
page with a list of over 300 names onto an excel sheet. now the sheet
has a hyper link for each name in that list. i can remove the links
individually but am wondering if there is an easier way.
 
Raider917, with VBA,

for a range
Range("A2:A999").Hyperlinks.Delete

for the whole sheet
Cells.Hyperlinks.Delete


--
Paul B
Always backup your data before trying something new
Please post any response to the newsgroups so others can benefit from it
Feedback on answers is always appreciated!
Using Excel 2002 & 2003
 
You could use a web search -- you would be best sticking to
actual sites with Excel information rather than those that highjack
newsgroups. For instance clearing out the format from a cell
does NOT remove the hyperlink. Writing a macro with a specific
range is not a good idea either, you want something general purpose
using either

Selection.Hyperlinks.Delete ' to act on a selection
--or--
ActiveSheet.HyperLinks.Delete ' to remove all hyperlinks

the second is not necessary because if means creating another macro
when all you had to do was first select all cells for actual macro and details see:

Removing object hyperlinks from a Cell or cell range (#DelHyperlinks)
http://www.mvps.org/dmcritchie/excel/buildtoc.htm#DelHyperlinks
for instructions to install and use a macro see
http://www.mvps.org/dmcritchie/excel/getstarted.htm
 
Paul said:
Raider917, with VBA,

for a range
Range("A2:A999").Hyperlinks.Delete

for the whole sheet
Cells.Hyperlinks.Delete




i did this but keep getting:

Compile error:

Invalid outside procedure
 
look at my answer and at the web pages, because you must
install the macro and macros have a SUB at the beginning
and END SUB at the end.

You could enter that code into the Intermediate Window in the
Visual Basic Editor (Ctrl+G) but that would not help you for future
use.

 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top