Solved

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

Posted on 2011-02-15
4
388 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 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

Drop Down List with Unique/Distinct Values (Part II - ComboBox or ListBox and Data Validation List Bonus!) David Miller (dlmille) Intro This article focuses on delivering unique, sorted lists to list objects (e.g., ComboBox, ListBox) and Dat…
Freeze panes is an option within all variants of Excel to enable parts of a sheet to remain stationary when the cursor is in another part of the sheet. This is a very useful feature which is overlooked or under used.
This Micro Tutorial will demonstrate how to use longer labels with horizontal bar charts instead of the vertical column chart.
This Micro Tutorial demonstrates in Microsoft Excel how to consolidate your marketing data by creating an interactive charts using form controls. This creates cool drop-downs for viewers of your chart to choose from.

828 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