+ Reply to Thread
Results 1 to 5 of 5

Conditional graphics

  1. #1
    Dkso
    Guest

    Conditional graphics

    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

    --
    [email protected]
    http://www.dkso.co.uk/
    http://homepage.ntlworld.com/dkso



  2. #2
    Dave Peterson
    Guest

    Re: Conditional graphics

    You may want to try J.E. McGimpsey's routine:
    http://www.mcgimpsey.com/excel/lookuppics.html


    Dkso wrote:
    >
    > 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
    >
    > --
    > [email protected]
    > http://www.dkso.co.uk/
    > http://homepage.ntlworld.com/dkso


    --

    Dave Peterson

  3. #3
    Dkso
    Guest

    Re: Conditional graphics

    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
    "Dave Peterson" <[email protected]> wrote in message
    news:[email protected]...
    > You may want to try J.E. McGimpsey's routine:
    > http://www.mcgimpsey.com/excel/lookuppics.html
    >
    >
    > Dkso wrote:
    >>
    >> 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
    >>
    >> --
    >> [email protected]
    >> http://www.dkso.co.uk/
    >> http://homepage.ntlworld.com/dkso

    >
    > --
    >
    > Dave Peterson




  4. #4
    Dave Peterson
    Guest

    Re: Conditional graphics

    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



    Dkso wrote:
    >
    > 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
    > "Dave Peterson" <[email protected]> wrote in message
    > news:[email protected]...
    > > You may want to try J.E. McGimpsey's routine:
    > > http://www.mcgimpsey.com/excel/lookuppics.html
    > >
    > >
    > > Dkso wrote:
    > >>
    > >> 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
    > >>
    > >> --
    > >> [email protected]
    > >> http://www.dkso.co.uk/
    > >> http://homepage.ntlworld.com/dkso

    > >
    > > --
    > >
    > > Dave Peterson


    --

    Dave Peterson

  5. #5
    Dkso
    Guest

    Re: Conditional graphics

    Again Dave,

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

    Dean
    "Dave Peterson" <[email protected]> wrote in message
    news:[email protected]...
    >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
    >
    >
    >
    > Dkso wrote:
    >>
    >> 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
    >> "Dave Peterson" <[email protected]> wrote in message
    >> news:[email protected]...
    >> > You may want to try J.E. McGimpsey's routine:
    >> > http://www.mcgimpsey.com/excel/lookuppics.html
    >> >
    >> >
    >> > Dkso wrote:
    >> >>
    >> >> 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
    >> >>
    >> >> --
    >> >> [email protected]
    >> >> http://www.dkso.co.uk/
    >> >> http://homepage.ntlworld.com/dkso
    >> >
    >> > --
    >> >
    >> > Dave Peterson

    >
    > --
    >
    > Dave Peterson




+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1