Hyperlink to show picture

asad

Well-known Member
Joined
Sep 9, 2008
Messages
1,434
Hello Guys,
I got the following code given to me on this forum to show pictures in a sheet.
Code:
Option Explicit

Private Sub Worksheet_Calculate()
Dim oPic As Picture
Me.Pictures.Visible = False
With Range("B1")
For Each oPic In Me.Pictures
If oPic.Name = .Text Then
With Range("H1")
oPic.Visible = True
oPic.Top = .Top
oPic.Left = .Left
End With
Exit For
End If
Next oPic
End With
End Sub

This is wroking very good.

Now I want the picture to show only when mouse hovers on a particular cell. I will try to explain a bit more.
I will have few entries in different cells on a sheet. Each entry will have a corressponding picture on the sheet itself but it will not be visible if I use part of the code above.
Now is it possible for me to make a condition in VB code that will alllow picture to show when the user hovers the mouse over an entry?

Thanks
Asad
 

Excel Facts

Did you know Excel offers Filter by Selection?
Add the AutoFilter icon to the Quick Access Toolbar. Select a cell containing Apple, click AutoFilter, and you will get all rows with Apple

Forum statistics

Threads
1,223,243
Messages
6,170,967
Members
452,371
Latest member
Frana

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