Created
May 16, 2016 10:59
-
-
Save RichPollock/c91953671d1be506e817aa75cc905853 to your computer and use it in GitHub Desktop.
Update all hyperlinked shapes to reflect a new sheet name
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sub ChangeHyperlinkedShapesToUseNewSheetNames() | |
Dim ws As Worksheet | |
For Each ws In ActiveWorkbook.Worksheets | |
For Each shp In ws.Shapes | |
If shp.Type = 1 Then | |
On Error Resume Next | |
If shp.Hyperlink.SubAddress = "'Old sheet'!A1" Then | |
shp.Hyperlink.SubAddress = "'New sheet'!A1" | |
End If | |
End If | |
Next shp | |
Next ws | |
End Sub |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment