Conditional graphics

D

Dkso

Hi there, can someone come to my rescue again?

I have a report that I produce, I need to have a different picture on the
report depending on the outcome of a criteria.

The criteria is a letter B, M, J, F and depending on which one is picked
depends on which graphic I need displaying.
All the graphics are stored on a sheet separate to the report.
I've so far named each graphic and tried to =name1 or =name2 but all I get
in the cell is Picture1 or picture2.

I have got some VBA in the spreadsheet to change stuff on the report before
printing so I can copy and paste the graphic in the VBA is that's the only
way but I'd rather a reference that changes the graphic automatically.

Thanks in advance
Dean
 
D

Dkso

Dave,

Thanks for that. It works a treat. However I have another problem I need
four copies of the same picture on the same sheet.
Basically I'm trying to print labels, each with a store logo on. All four
labels on the sheet are the same.

How can this be altered or is there another way.

Dean
 
D

Dave Peterson

I think it depends on what you did to make it work.

I think I'd name each group of 4 pictures very similarly.

Then you could use that fact and the value you put in that other cell.

If your cell returns Dkso and Dean,
I'd name 4 pictures Dkso1, dkso2, dkso3, dkso4
and 4 pictures Dean1, dean2, dean3, dean4

And use a line like this in J.E.'s code:
If LCase(oPic.Name) Like LCase(.Text & "*") Then

instead of:
If oPic.Name = .Text Then
 
D

Dkso

Again Dave,

Thanks. It took a while but the idea was correct. Thanks for you help

Dean
 
Top