Solved

Use a picture within a spreadsheet on an Excel user Form (load on Initialize)

Posted on 2011-02-15
4
391 Views
Last Modified: 2012-06-21
I'm trying to use a picture that's stored within a spreadsheet in a User Form. I know how to reference pictures as files on User Forms, but in this case I want the Excel file to be self contained so I don't have to ship the picture file seperately.

If I have Picture_1 in Sheet3 how would I call this to load into my image placeholder on the User Form_Initialize?

Sorry if this is really simple but it's baffling me!

Cheers

Pete
0
Comment
Question by:pfmurray
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
  • 2
4 Comments
 
LVL 85

Expert Comment

by:Rory Archibald
ID: 34895215
How is the picture stored in the worksheet? If it's in an ActiveX Image control, then you can simply assign the Picture property from one to the other; if not, then you need a lot of API code.
0
 

Author Comment

by:pfmurray
ID: 34895238
Hi Rory - very prompt as always!

At the moment it's just a pic inserted into the worksheet from a jpg file. Is there something I need to do to make it available without a lot of code?
0
 
LVL 85

Accepted Solution

by:
Rory Archibald earned 250 total points
ID: 34895313
If you add an image control to the worksheet, then load your picture into that, it is much easier to pass it to the image control on the userform. Mind you, you could also just load it into the userform directly unless you need to switch images?
0
 

Author Closing Comment

by:pfmurray
ID: 34895430
Sometimes you just need someone to state the obvious and it clicks. Thanks Rory!  I just loaded it into the form and that solved it. I was going wrong because I was thinking I had to load the image every time the form was called. Not true!
0

Featured Post

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article will guide you to convert a grid from a picture into Excel format using Microsoft OneNote and no other 3rd party application.
You need to know the location of the Office templates folder, so that when you create new templates, they are saved to that location, and thus are available for selection when creating new documents.  The steps to find the Templates folder path are …
The viewer will learn how to create a normally distributed random variable in Excel, use a normal distribution to simulate the return on an investment over a period of years, Create a Monte Carlo simulation using a normal random variable, and calcul…
This Micro Tutorial will demonstrate on a Mac how to change the sort order for chart legend values and decrpyt the intimidating chart menu.

737 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question