Results 1 to 3 of 3
  1. #1
    5 Star Lounger jujuraf's Avatar
    Join Date
    Jun 2001
    Location
    San Jose, California, USA
    Posts
    1,061
    Thanks
    0
    Thanked 0 Times in 0 Posts

    dynamic images with ImageControl (Excel 2003)

    I'm creating a pop-up help form for a workbook and want to include a small picture for each item chosen. I have a pre-populated list box that when one item is selected, a label element gets populated with the corresponding text and I'd also like to display a picture (Image control from the form's Toolbox). These pictures are stored on a hidden worksheet and I've named them all but can't figure out how at run-time to display a given picture. I can do it manually of course from the Image properties (select an image from a file on disk) but I'm not going to distribute these pix as files. Is that possible? Other solutions?

    My other option is to create 'n' number of image controls (one per list box item), and dynamically show/hide the one I want to display when the user clicks the listbox.

    Deb <img src=/S/boxedin.gif border=0 alt=boxedin width=25 height=20>

  2. #2
    Silver Lounger
    Join Date
    Mar 2001
    Location
    Springfield, Ohio, USA
    Posts
    2,136
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: dynamic images with ImageControl (Excel 2003)

    Don't remember where, but I think I did something like this with copy and paste. If I remember more, I'll post it later. --Sam
    <font face="Comic Sans MS">Sam Barrett, CACI </font face=comic>
    <small>And the things that you have heard... commit these to faithful men who will be able to teach others also. 2 Timothy 2:2</small>

  3. #3
    5 Star Lounger jujuraf's Avatar
    Join Date
    Jun 2001
    Location
    San Jose, California, USA
    Posts
    1,061
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: dynamic images with ImageControl (Excel 2003)

    Thanks for the offer. After a few more hours, I decided to just do the 'loop thing' and so at form init, I cycle through the 15 images and set Visible=False on all but the one I need to show (the one selected depends on other data in the model). It's not as elegant as dynamically changing the picture in the Image control but it works (a wee bit slow though). I had to put all my images in separate files and then manually create 15 Image controls which I stacked on top of each other each with their own images. Now that took a while!! <img src=/S/doze.gif border=0 alt=doze width=15 height=15>

    Thnx, Deb

Posting Permissions

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