using this code I am able to have a hyperlink (not active, nothing happens when you click on it) so that it shows a "screen tip" (showing the 'date of hire'. This is for an Org chart I am working on.) But i only can get it to work with 1 object. Will I have to have a separate macro for each object, or is it possible to have one macro provide different screen tips for each object?
code:
the above Macro shows this when the cursor is hovered above the shape "RM_agro":
Here is code for where i am attempting to do the same thing as above, but with multiple objects and inside one macro. Is this possible or do I need to use a separate macro for each object? (OR.. better question, is there a better/easier way to do this where I can show a "screen tip" for each object than what I am attempting to do?) Please and Thank you for any help on this.
code:
Code:
Sub ShowDOH()
Dim RM_agro As Range
Set RM_agro = Selection
ActiveSheet.Shapes.Range(Array("RM_agro")).Select [B][COLOR=#006400]' Richard Mullins[/COLOR][/B]
ActiveSheet.Hyperlinks.Add _
Anchor:=Selection.ShapeRange.Item(1), _
Address:="", _
ScreenTip:="date of hire: 11-1-2017"
RM_agro.Select
End Sub
the above Macro shows this when the cursor is hovered above the shape "RM_agro":
Here is code for where i am attempting to do the same thing as above, but with multiple objects and inside one macro. Is this possible or do I need to use a separate macro for each object? (OR.. better question, is there a better/easier way to do this where I can show a "screen tip" for each object than what I am attempting to do?) Please and Thank you for any help on this.
Code:
Sub ShowDOH()
Dim RM_agro As Range
Dim JN_cfo As Range
Set RM_agro = Selection
Set JN_cfo = Selection
ActiveSheet.Shapes.Range(Array("RM_agro")).Select [B][COLOR=#006400]' Richard Mullins[/COLOR][/B]
ActiveSheet.Hyperlinks.Add _
Anchor:=Selection.ShapeRange.Item(1), _
Address:="", _
ScreenTip:="date of hire: 11-1-2017"
ActiveSheet.Shapes.Range(Array("JN_cfo")).Select [B][COLOR=#006400]' Jim Nattier[/COLOR][/B]
ActiveSheet.Hyperlinks.Add _
Anchor:=Selection.ShapeRange.Item(1), _
Address:="", _
ScreenTip:="date of hire: 5-1-2007"
JN_cfo.Select
RM_agro.Select
End Sub