Load a picture to a userform from a picture in a spreadsheet

rory

New Member
Joined
May 5, 2004
Messages
2
Hi, can anyone help.

I have a group of charts and pictures on a spreadsheet

I have a userform that uses the loadpicture function to load the charts successfully into an image on the userform. (There are lots of examples around as to how to do this).
However I am struggling to find the same in terms of simply loading the embedded pictures into the image on the userform. All the examples I have refer to pictures stored on drives e,g. loadpicture(C:= / / /.gif). I am looking for loadpicture(thisworksheet.sheets("sheetname").???
can anyone help.
Thanks,
Rory
 

Excel Facts

Which Excel functions can ignore hidden rows?
The SUBTOTAL and AGGREGATE functions ignore hidden rows. AGGREGATE can also exclude error cells and more.
Hi Rory. Is it this easy? Dave
Code:
UserForm1.Image1.Picture = Sheets("Sheet1").Image1.Picture
 
Upvote 0
You may need to also throw in a Repaint to refresh the userform

eg as NdNoviceHlp has given THEN

Me.Repaint
 
Upvote 0
Thanks Ivan. I didn't mention it, but in order for the above code to work more than once you need to clear the image control first. Me.Repaint I did not know. Is it the same as clearing the image previous? The word "Repaint" seems to imply layers. Are previous images available? Dave
 
Upvote 0
This wasn't so easy for me. This has been driving me crazy and then i stumbled across this thread and was very happy, but i can't get it to work. FYI:

I have a picture name "Mike" in a spreadsheet and userform info as follows, but keep getting Object doesn't support this method or property...

tried the following w/ no luck:

frmProp.propImage.Picture = ActiveSheet.Pictures("Mike")frmProp.propImage.Picture = Sheets("Report").Pictures("Mike")
frmProp.propImage.Picture = Sheets("Report").Shapes("Mike")

even tried
frmProp.propImage.Picture = Sheets("Report").Shapes("Mike").Picture

i know this is possible, just cant get the syntax...any help would be wonderful...

thx
 
Upvote 0

Forum statistics

Threads
1,214,979
Messages
6,122,552
Members
449,088
Latest member
davidcom

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top