![]() |
save picture in a worksheet programmatically
Hi,
i searched queries up to now and could not find anything about saving a picture in a normal worksheet(not a chart) to a local directory as a gif/jpg file programmatically. please, can anybody help me? |
save picture in a worksheet programmatically
why is it easy to insert a picture into worksheet but no way to save the same
picture in a file directory? i am sure there are people facing the same problem as i do. is there any way to save the picture programmatically? can anybody please help me? thanks, "ermeko" wrote: Hi, i searched queries up to now and could not find anything about saving a picture in a normal worksheet(not a chart) to a local directory as a gif/jpg file programmatically. please, can anybody help me? |
save picture in a worksheet programmatically
Hi,
The trick is to use the object that does support exporting, which is a chart. Place your image within a chart object and then export. Have a look at the code I use in my addin. http://www.andypope.info/vba/gex.htm Cheers Andy ermeko wrote: why is it easy to insert a picture into worksheet but no way to save the same picture in a file directory? i am sure there are people facing the same problem as i do. is there any way to save the picture programmatically? can anybody please help me? thanks, "ermeko" wrote: Hi, i searched queries up to now and could not find anything about saving a picture in a normal worksheet(not a chart) to a local directory as a gif/jpg file programmatically. please, can anybody help me? -- Andy Pope, Microsoft MVP - Excel http://www.andypope.info |
save picture in a worksheet programmatically
ANDY THANKS,
how do i create chart programmatically? how do i put a picture into that chart programmatically? how do i then save it? i visited the link and downloaded the code but could not understand anything from that code. can you please explain it in a more simple code please? thanks again, "Andy Pope" wrote: Hi, The trick is to use the object that does support exporting, which is a chart. Place your image within a chart object and then export. Have a look at the code I use in my addin. http://www.andypope.info/vba/gex.htm Cheers Andy ermeko wrote: why is it easy to insert a picture into worksheet but no way to save the same picture in a file directory? i am sure there are people facing the same problem as i do. is there any way to save the picture programmatically? can anybody please help me? thanks, "ermeko" wrote: Hi, i searched queries up to now and could not find anything about saving a picture in a normal worksheet(not a chart) to a local directory as a gif/jpg file programmatically. please, can anybody help me? -- Andy Pope, Microsoft MVP - Excel http://www.andypope.info |
save picture in a worksheet programmatically
Try this, although you will still need to specify which shape and output
filename. Sub ShapeExport() Dim objCht As ChartObject Dim shpTemp As Shape ' reference the thing you want to export Set shpTemp = ActiveSheet.Shapes(1) With ActiveSheet.ChartObjects.Add(1, 1, 10, 10) .Width = shpTemp.Width + 2 .Height = shpTemp.Height + 2 shpTemp.Copy With .Chart .Paste With .ChartArea With .Border .Weight = 2 .LineStyle = 0 End With .Interior.ColorIndex = xlNone End With ' filename and folder .Export "C:\MyImage.gif" End With .Delete End With End Sub Cheers Andy ermeko wrote: ANDY THANKS, how do i create chart programmatically? how do i put a picture into that chart programmatically? how do i then save it? i visited the link and downloaded the code but could not understand anything from that code. can you please explain it in a more simple code please? thanks again, "Andy Pope" wrote: Hi, The trick is to use the object that does support exporting, which is a chart. Place your image within a chart object and then export. Have a look at the code I use in my addin. http://www.andypope.info/vba/gex.htm Cheers Andy ermeko wrote: why is it easy to insert a picture into worksheet but no way to save the same picture in a file directory? i am sure there are people facing the same problem as i do. is there any way to save the picture programmatically? can anybody please help me? thanks, "ermeko" wrote: Hi, i searched queries up to now and could not find anything about saving a picture in a normal worksheet(not a chart) to a local directory as a gif/jpg file programmatically. please, can anybody help me? -- Andy Pope, Microsoft MVP - Excel http://www.andypope.info -- Andy Pope, Microsoft MVP - Excel http://www.andypope.info |
All times are GMT +1. The time now is 12:40 PM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com