Adding Mouseover or Comment to Shapes in Excel

Lerumeur

New Member
Joined
Feb 11, 2008
Messages
6
How can I add a mouseover/comment to an autoshape/freeform shape in excel? Currently I have a shape that runs a macro when clicked. I'd like a little pop up to tell the use what the shape does.
 
Thanks for the quick reply Erik. I created a new workbook and tried out some of the solutions mentioned in that thread. I think Jaafar's solution would probably do what I'm looking for but from the description it sounds like it should have been popping up a comment box or something. The only time I was able to see anything though is if I clicked on a shape and got the MsgBox with the shape name in it.

Should I be getting a comment box or something popping up without having to click or am I misunderstanding what it should be doing? Could the version of Excel have anything to do with it (I'm running 2007)?
Hi,

Did you try out the sample workbook?
You should get a popup when hoovering over the shapes.
Also, you would better ask the questions in that thread or send a little PM to Jaafar with a link to this thread (no question, just the link).

best regards,
Erik
 
Upvote 0

Excel Facts

Save Often
If you start asking yourself if now is a good time to save your Excel workbook, the answer is Yes
Hi,

Did you try out the sample workbook?
You should get a popup when hoovering over the shapes.
Also, you would better ask the questions in that thread or send a little PM to Jaafar with a link to this thread (no question, just the link).

best regards,
Erik

I dunno if this query (mouseover comments for shapes) is still alive... but if its then there is a simple solution to it... reply to this comment and i shall post the solution
 
Upvote 0
Hi Erik - Long time no see! :)

The simplest solution is to add an Hyperlink to the shape so the tooltip can pop up whenever the mouse is passed over the shape.
However the hyperlink approach has one big drawback : If the shape has a Macro attached to it then the Macro doesn't run when clicking on the shape.

This was discussed HERE recently - See post 7 for a workaround.
 
Upvote 0
So I am not much of a programmer, but this is where I am going with it.
Right Click the Shape
Select Hyperlink
Click Screen Tip
Type in your message
Click OK
Click Bookmark
Type A1 in the top box
Click OK
Click OK

Code:
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
If Target.Address = "$A$1" Then 'this is the "a1" in the preceding quote
'call macro
[b1].Select 'probably can just deselect instead? in order to run the next shape click
End If
End Sub

By the way I have a shape over the A1 cell to prevent it from getting selected
 
Last edited:
Upvote 0
Rushing off to work but to compile the longer code under the worksheet and still associate the specific cell I created a tab to auto generate the code.
Code:
Sub addHyperAddIdentifierrev1()
icount = 1
Worksheets("macro code").Cells(icount, 1).Value = "Private Sub Worksheet_SelectionChange(ByVal Target As Range)"
icount = icount + 1
For Each myshape In ActiveSheet.Shapes
If myshape.OnAction <> "" Then
Cells(myshape.TopLeftCell.Row, myshape.TopLeftCell.Column).Value = myshape.Name
ActiveSheet.Hyperlinks.Add Anchor:=myshape, Address:="completeGamerev1.xlsm#'test hyper to macro'!" & myshape.TopLeftCell.Address, ScreenTip:="ahha"

Worksheets("macro code").Cells(icount, 1).Value = "If Target.Address = " & Chr(34) & myshape.TopLeftCell.Address & Chr(34) & " Then"
icount = icount + 1
Worksheets("macro code").Cells(icount, 1).Value = "'''''call macro and in you can use the (cell.value as a variable so you know what shape you are selecting)"
icount = icount + 1
Worksheets("macro code").Cells(icount, 1).Value = "[b1].Select"
icount = icount + 1
Worksheets("macro code").Cells(icount, 1).Value = "End If"
icount = icount + 1
End If
Next
Worksheets("macro code").Cells(icount, 1).Value = "End Sub"
End Sub


I can explain more later...
 
Upvote 0

Forum statistics

Threads
1,214,636
Messages
6,120,664
Members
448,976
Latest member
sweeberry

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