View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Ken Johnson Ken Johnson is offline
external usenet poster
 
Posts: 1,073
Default Can't find pictures in a referenced formula

On Apr 24, 11:20 pm, "S Boak" wrote:
Hi Folks:

Need some help with a reference in a workbook I found for looking up
pictures - the book works great, but I owuld like to use other pictures, and
I can't find where the pictures are stored.

The book has 2 sheets - 1 and 2.

Sheet1 A2 is data-val cell pulling in one of four names from PicTable (on
Sheet 2 - a simple 2 Column 4 Row lookup )

Sheet 1 F1 displays the piture and has a formula:
=VLOOKUP(A2, PicTable, 2, FALSE)

I understand the formula, but can't find the pictures . . .

I'm bad with VB and the only code in the book I can find is:

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

I wd like to use different pictures and learn how to drive this for what I
need, but I can't find the pictures . . . . Would appreciate any help.

Thanks / Regards


The pictures are on sheet 1 but all bar the one whose name is in F1
are not visible because their Visible property has been set to False.

You could add your own pictures by simply pasting them into sheet 1
and including their detail in the lookup table. Also you can delete
unwanted pictures by deleting them after making them visible and
deleting their details from the lookup table.

You can render all the pictures visible by temporarily commenting out
the second line (Me.Pictures.Visible = False) then separately
selecting each picture from the A1 drop down. That way all the
pictures will end up visible and on F1.

Ken Johnson