Removing hyperlinks from multiple images

JacksonTriggs

New Member
Joined
Nov 4, 2021
Messages
20
Office Version
  1. 365
Platform
  1. MacOS
Hi,

I have a spreadsheet with multiple logos in a single column, each of which have a single hyperlink. I'm trying to remove the links. However, when I select all images, the "Remove Hyperlink" option is greyed out. I cannot find any previous forum posts on this issue.

Please help? Thanks in advance!
 

Excel Facts

Wildcard in VLOOKUP
Use =VLOOKUP("Apple*" to find apple, Apple, or applesauce
This macro does what you want. It's targetting the active worksheet.

VBA Code:
Sub ShapeHyperlinkDelete()
    Dim shp As Shape
    For Each shp In ActiveSheet.Shapes
        On Error Resume Next
        shp.Hyperlink.Delete
    Next
End Sub
 
Upvote 0
Solution
One more option...
I don't think so it's possible without VBA.
With right click select images from which you want to remove hyperlinks or select all images and run this code...
VBA Code:
Sub RemoveSelectedHyperlinks()
    
    On Error Resume Next
    With ActiveSheet
        For vN = 1 To Selection.ShapeRange.Count
            .Shapes(Selection.ShapeRange.Item(vN).Name). _
             Hyperlink.Delete
        Next vN
    End With
    
End Sub
 
Upvote 0
This macro does what you want. It's targetting the active worksheet.

VBA Code:
Sub ShapeHyperlinkDelete()
    Dim shp As Shape
    For Each shp In ActiveSheet.Shapes
        On Error Resume Next
        shp.Hyperlink.Delete
    Next
End Sub
It worked perfectly. I should clarify this macro removes hyperlinks from images (shapes) yet not hyperlinks associated with text. Exactly what I wanted. Thank you so much (again)!
 
Upvote 0
One more option...
I don't think so it's possible without VBA.
With right click select images from which you want to remove hyperlinks or select all images and run this code...
VBA Code:
Sub RemoveSelectedHyperlinks()
   
    On Error Resume Next
    With ActiveSheet
        For vN = 1 To Selection.ShapeRange.Count
            .Shapes(Selection.ShapeRange.Item(vN).Name). _
             Hyperlink.Delete
        Next vN
    End With
   
End Sub
Thank you Excel Max! It worked perfectly. The only difference from GWteB's macro is, and as you mentioned, it works for images that are selected. Very helpful when needing to remove hyperlinks from some of the images. Again, much appreciated!
 
Upvote 0

Forum statistics

Threads
1,214,415
Messages
6,119,381
Members
448,888
Latest member
Arle8907

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top