ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   How to export a range to a picture ? (https://www.excelbanter.com/excel-programming/301177-how-export-range-picture.html)

Ayato[_8_]

How to export a range to a picture ?
 
Hello,

I am trying to create a macro that could export (save) a range (fo
example {A1:T20} to a picture (bitmap).

A little bit like a printscreen or a screen capture...

Anybody have any idea if it is possible ?

Please advise,

regards,
Ayat

--
Message posted from http://www.ExcelForum.com


Harald Staff

How to export a range to a picture ?
 
Hi Ayato

I have some code for this at
http://www.mvps.org/dmcritchie/excel/xl2gif.htm

HTH. Best wishes Harald

"Ayato " skrev i melding
...
Hello,

I am trying to create a macro that could export (save) a range (for
example {A1:T20} to a picture (bitmap).

A little bit like a printscreen or a screen capture...

Anybody have any idea if it is possible ?

Please advise,

regards,
Ayato


---
Message posted from http://www.ExcelForum.com/




Ed Ferrero[_5_]

How to export a range to a picture ?
 
Hi Ayato,

I think it was Jim Wilcox who first suggested copying the range to a chart
and then using the chart.export method to save as a gif.

Something like this will do it;

Sub CopyRngToGif()
Dim MyRange As Range

Application.DisplayAlerts = False

Set MyRange = Worksheets(1).Range("A1:C6")

MyRange.CopyPicture

With Charts.Add
.Paste
.ChartArea.Clear
.Export "C:\temp\MyRange.gif"
.Delete
End With

Application.DisplayAlerts = True

End Sub

Ed Ferrero
http://edferrero.m6.net

Hello,

I am trying to create a macro that could export (save) a range (for
example {A1:T20} to a picture (bitmap).

A little bit like a printscreen or a screen capture...

Anybody have any idea if it is possible ?

Please advise,

regards,
Ayato


---
Message posted from http://www.ExcelForum.com/





All times are GMT +1. The time now is 07:16 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com