Excel

Remove or Delete Underlying Hyperlinks in a Predefined Range

Ease of Use

Easy

Version tested with

2000 

Submitted by:

Anne Troy

Description:

Removes the hyperlinks in a specified range, leaving the visible text behind. 

Discussion:

You copied a bunch of stuff from the web, and it's got a bunch of hyperlinks under it that you don't want...you just want the text. Use this macro to keep the text and trash the hyperlinks. 

Code:

instructions for use

			

Sub RemoveHyperLinks() Range("A1:A10").Hyperlinks.Delete End Sub

How to use:

  1. Copy the code above.
  2. Open your workbook.
  3. Hit Alt+F11 to open the Visual Basic Editor (VBE).
  4. Choose Insert-Module from the menu.
  5. Paste the code into the window at right.
  6. Change the range A1:A10 to desired range of cells (A:A would do the entire Column A).
  7. Close the VBE.
 

Test the code:

  1. Go to Tools-Macro-Macros and double-click RemoveHyperlinks.
 

Sample File:

deletehyperlinks.zip 7.1KB 

Approved by mdmackillop


This entry has been viewed 106 times.

Please read our Legal Information and Privacy Policy
Copyright @2004 - 2020 VBA Express