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.
 

thinksriniii

Board Regular
Joined
Apr 1, 2009
Messages
93
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:

thinksriniii

Board Regular
Joined
Apr 1, 2009
Messages
93
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
 

Forum statistics

Threads
1,082,548
Messages
5,366,227
Members
400,880
Latest member
dwb

Some videos you may like

This Week's Hot Topics

Top