Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

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

Posted on 2011-02-15
4
Medium Priority
?
408 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
  • 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 1000 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

Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

Question has a verified solution.

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

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 …
After seeing numerous questions for Dynamic Data Validation I notice that most have used Visual Basic to solve the problem. This suggestion is purely formula based and can be used in multiple rows.
This Micro Tutorial demonstrate the bugs in Microsoft Excel for Mac with Pivot Charts.
This Micro Tutorial will demonstrate in Microsoft Excel how to add style and sexy appeal to horizontal bar charts.

783 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