Saving an image from a worksheet in a temporary folder

Cease

Board Regular
Joined
Dec 28, 2010
Messages
112
Hi,
I'm trying to take an image from a worksheet and save it as a temporary file using vba... anyone know if this is possible or how to do so?

For any examples I'm trying to use:
"Sheet1" and "Picture1"

Any advice or direction would be greatly appreciated.
 

Excel Facts

What did Pito Salas invent?
Pito Salas, working for Lotus, popularized what would become to be pivot tables. It was released as Lotus Improv in 1989.
This is one way:-
Copy picture to Chart Object:- save as "Gif" file "First Code"
Code:
Private Sub CommandButton1_Click()
Dim Cht As Object, fName As String
Set Cht = Sheets("Sheet4").ChartObjects(1).Chart
fName = "C:\Documents and Settings\test\Desktop\dog.gif"
Cht.Export Filename:=fName, Filtername:="GIF"
End Sub
Retrieve picture to Image control on sheet.
Code:
Private Sub CommandButton2_Click()
Image1.Picture = LoadPicture("C:\Documents and Settings\test\Desktop\dog.gif")
End Sub
Regards Mick
 
Upvote 0

Forum statistics

Threads
1,215,644
Messages
6,125,991
Members
449,278
Latest member
MOMOBI

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