PDA

View Full Version : Problem in converting charts in workbooks to pictureP



wckalan
09-19-2016, 07:22 PM
Guys, I am trying to convert all charts of workbooks in a selected folder into pictures. It is working properly during few samples trial. But 1004 paste error keep coming out when there are a large amount of charts there. Any ways to solve that? Codes are attached.

mana
09-20-2016, 04:09 AM
For Each sht In ActiveWorkbook.Worksheets
sht.Activate '★
With sht
'loop through the sheet of the active worksheet
For Each chtO In .ChartObjects
chtO.Select '★
chtO.Copy
.Range("a1").Select '★
.PasteSpecial Format:="Bitmap", Link:=False, DisplayAsIcon:=False

snb
09-20-2016, 05:45 AM
sub M_snb()
for each sh in sheets
for each it in sh.ChartObjects
it.chart.export "G:\chart.gif", "GIF"
next
next
End Sub