Display pictures from other sheet

thinksriniii

Board Regular
Joined
Apr 1, 2009
Messages
93
Hi Guys,

I am trying to display a picture of an employee from sheet2 in sheet1. I have a data validation filed in sheet1 from which one can select he employee name. In sheet2 i have a table in which column 1 has the employee name and column 2 has the picture of the employee.
I have used the technique available in the link below.

http://www.mcgimpsey.com/excel/lookuppics.html

But when i select the employee name its displaying a blank value or its not displaying anything. And i have placed the code given in the link in a module as well

Could someone help me on this.
 

Excel Facts

Repeat Last Command
Pressing F4 adds dollar signs when editing a formula. When not editing, F4 repeats last command.
Based on my check the code placed in the code module does not seem to run.

And i am using Excel 2007

Thanks,
Dave
 
Last edited:
Upvote 0
Hi Guys,

Made little changes to the code and put it in the worksheet module and it works fine.
Code:
Private Sub Worksheet_Calculate()
    Dim oPic As Picture
    Me.Pictures.Visible = False
        With Range("F1")
            For Each oPic In Me.Pictures
                If oPic.Name = .Text Then
                    oPic.Visible = True
                    oPic.Top = .Top
                    oPic.Left = .Left
                    Exit For
                End If
            Next oPic
        End With
End Sub


Thanks a lot

Cheers,
Dave
 
Upvote 0

Forum statistics

Threads
1,214,649
Messages
6,120,731
Members
448,987
Latest member
marion_davis

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