Last active
December 11, 2015 13:48
-
-
Save RichPollock/4609965 to your computer and use it in GitHub Desktop.
Set the tool tips of all hyperlinked shapes in Excel to the text contained in the shape (thereby replacing the default tool tip, which includes the document file path)
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 AddScreenTipsToHyperlinkedShapesUsingShapeText() | |
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 | |
shp.Hyperlink.ScreenTip = shp.OLEFormat.Object.ShapeRange.TextFrame.Characters.Text | |
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