Link to home
Create AccountLog in
Avatar of pfmurray
pfmurrayFlag for United Kingdom of Great Britain and Northern Ireland

asked on

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

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
Avatar of Rory Archibald
Rory Archibald
Flag of United Kingdom of Great Britain and Northern Ireland image

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.
Avatar of pfmurray

ASKER

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?
ASKER CERTIFIED SOLUTION
Avatar of Rory Archibald
Rory Archibald
Flag of United Kingdom of Great Britain and Northern Ireland image

Link to home
membership
Create an account to see this answer
Signing up is free. No credit card required.
Create Account
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!