Mouseover text box popup

GregWood

New Member
Joined
Aug 26, 2014
Messages
12
Hi there,

I have a number of images (icons) on a excel worksheet. What I'm looking for is when a person's mouse passes over the image a text box pops up to give the person a brief description of the image. When the mouse move off the image the textbox should disappear. The image already has a macro assigned to it, which when the person clicks on the image it opens another worksheet.

I'm new to macros and I'm completely stuck. Please could someone assist with some code and also a description of how to implement the code.

Thanks
 

Excel Facts

Copy PDF to Excel
Select data in PDF. Paste to Microsoft Word. Copy from Word and paste to Excel.
Also, here is a little more information about how you would implement the code to create the tooltips. I might do something like this. Place this code in Module1:
Code:
Sub addtooltip()
    Dim shp As Shape
    For Each shp In ActiveSheet.Shapes
        ActiveSheet.Hyperlinks.Add shp, "", "", ScreenTip:="Hello from " & shp.Name
    Next shp
End Sub
Run this subroutine. This will tell you the name of all of the pictures on your sheet. Then add this code to Module1:
Code:
Sub othertooltips()
    Dim shp As Shape
    Dim tipstring As String
    For Each shp In ActiveSheet.Shapes
        tipstring = ""
        If shp.Name = "Picture 1" Then
            tipstring = "Click here to do A"
        ElseIf shp.Name = "Picture 2" Then
            tipstring = "Click here to do B"
        ElseIf shp.Name = "Picture 3" Then
            tipstring = "Click here to do C"
        ElseIf shp.Name = "Picture 4" Then
            tipstring = "Click here to do D"
        End If
        If tipstring <> "" Then
            ActiveSheet.Hyperlinks.Add shp, "", "", ScreenTip:=tipstring
        End If
    Next shp
End Sub
Once you run this code, the tooltips you have specified will be added to each image. Hopefully this is enough information to get you headed in the right direction.
 
Upvote 0
Thanks for assistance. I get it to work and show "pop up" with the test I want. However I not certain how to do the hyperlink.
 
Upvote 0
You don't need to create a hyperlink unless you want to. Using the hyperlink is just a way to get around the fact that images do not have a screentip functionality associated with them. However, did adding the hyperlink (which goes nowhere but shows a screentip) break the functionality of what used to happen when you click on the image?
 
Upvote 0
I get it to show the "pop up" but it does link. Below is the code for the macro that I was using. Sorry I'm slowly learn how VB works, how would I incorporate it?Something I didn't say was that the worksheets are all hidden besides the dashboard, if you click on the icon it opens the worksheet selected. When you click on the next icon the current worksheet closes and the next opens. The dashboard however remains open the whole time.

Code:
Sub Home_Click()
    Sheets("Calculators").Visible = xlHidden
    Sheets("Local Supplier Spend").Visible = xlHidden
    Sheets("Excluded Spend").Visible = xlHidden
    Sheets("Data Results").Select
End Sub

Thanks for your assistance.
 
Upvote 0
Hmmm. Yes, I see the problem. The Home_Click functionality no longer runs after adding the dummy hyperlink to show the screentip. There is a "Worksheet_FollowHyperlink" event, but it doesn't seem to work in this case (either because there isn't really a hyperlink, or because it only works with hyperlinks in cells). I will look into this further, but can't do so until tonight. Maybe others will have some ideas in the meantime. It seems like there has to be a solution.
 
Upvote 0

Forum statistics

Threads
1,213,531
Messages
6,114,167
Members
448,554
Latest member
Gleisner2

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