Reputation: 31
I have a problem. I already make a maps with shape on excel. I want show information when i direct cursor to one of location. Thanks before
Upvotes: 0
Views: 14459
Reputation: 346
One limitation of the above answer is that the shape will show the screen tip on hover but a macro assigned to the shape will not work by click. A workaround suggested by Tim Williams:
VBA Run Macro and Screen Tip (or Tool Tip) From Shape. I cannot get the code I found to work
Upvotes: 3
Reputation: 96791
We can use the property of a Hyperlink
that can display a ToolTip on MouseOver.
I have a Shape called MyShape
. Running this macro:
Sub MeaningOfLife()
Dim r As Range
Set r = Selection
ActiveSheet.Shapes.Range(Array("MyShape")).Select
ActiveSheet.Hyperlinks.Add _
Anchor:=Selection.ShapeRange.Item(1), _
Address:="", _
ScreenTip:="The Meaning of Life Is..."
r.Select
End Sub
will assign an inactive hyperlink to the Shape.
Upvotes: 10