Howdy! Need a little help with code...

  • Thread starter Thread starter TheMilkGuy
  • Start date Start date
T

TheMilkGuy

Hi folks, I'm running Excel 2007 for this little project.

I have a .gif file loaded behind a named range, and I'd like to insert
(effectively overlay) other gif files into that named range depending
on the results (true/false) of a series of cells.

Example: if Cell A1 is True, Picture 2 will display in a certain
area, which the original gif file is underlying. If Cell A2 is True,
Picture 3 will display. If Cell A3 is False, skip. If Cell A4,
etc...

I hope my thoughts are coming through clear enough - happy to clarify
if they are not.

Cheers!
Craig
 
Hi folks, I'm running Excel 2007 for this little project.

I have a .gif file loaded behind a named range, and I'd like to insert
(effectively overlay) other gif files into that named range depending
on the results (true/false) of a series of cells.

Example:  if Cell A1 is True, Picture 2 will display in a certain
area, which the original gif file is underlying.  If Cell A2 is True,
Picture 3 will display.  If Cell A3 is False, skip.  If Cell A4,
etc...

I hope my thoughts are coming through clear enough - happy to clarify
if they are not.

Cheers!
Craig

hi
see this site. it has something similar to what you want ie display
pic on condition.

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

regards
FSt1
 
Thanks FSt1, I think that may fit the bill. I'll toy around with
perhaps using one formula per cell, since I just want pictures to
overlay vice replace.

Cheers!
C
 
Based on the formula on the McGimpsey website:
Private Sub Worksheet_Calculate()
Dim oPic As Picture
Me.Pictures.Visible = False
Me.Pictures("Picture 1").Visible = True
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


Can I apply the formula in F1 [=VLOOKUP(A2, PicTable, 2, FALSE)]
across a range [C6:C21], displaying the picture associated with
whichever cells in the range appear as "TRUE"? They're in gif format
with a transparent background, so I'm hoping they will overlay.

Thanks again,
Craig
 
Back
Top