E
erooijackers
I have written a macro that exports 44 graphs to a certain directory
under unique names. The problem hereby is that every time i use this
macro, the graphs turn smaller and smaller. When the macro is used
about 5 times, the graphs (piecharts) are about 40% of its original
size i created them.
The resizing affects not the outer graph box (title, graph, labels
etc.), but only the inner graph (only piechart display) box.
VBA code used.
Sub ExportAllCharts()
Sheets("Graphs").Select
ActiveSheet.ChartObjects("Grafiek 2").Activate
ActiveChart.ChartArea.Select
ActiveChart.Export Filename:="W:\GEBOUW\DATAHVD\Beheer\Beheer Energie
\-- Website updating--\Energy
section\All Graphs\2006 PieChart Electricity DAF Hi.jpg", _
FilterName:="jpeg"
ActiveSheet.ChartObjects("Grafiek 12").Activate
ActiveChart.ChartArea.Select
ActiveChart.Export Filename:="W:\GEBOUW\DATAHVD\Beheer\Beheer Energie
\-- Website updating--\Energy
section\All Graphs\2006 PieChart Gas DAF Hi.JPG", _
FilterName:="jpeg"
AND THE SAME FOR ALL OTHER 42 GRAPHS
Sheets("Macro blad").Select
Range("E19").Select
ActiveWorkbook.Save
End VBA code example
Does anyone have a solution?
(NOTE: i am a beginning VBA user)
under unique names. The problem hereby is that every time i use this
macro, the graphs turn smaller and smaller. When the macro is used
about 5 times, the graphs (piecharts) are about 40% of its original
size i created them.
The resizing affects not the outer graph box (title, graph, labels
etc.), but only the inner graph (only piechart display) box.
VBA code used.
Sub ExportAllCharts()
Sheets("Graphs").Select
ActiveSheet.ChartObjects("Grafiek 2").Activate
ActiveChart.ChartArea.Select
ActiveChart.Export Filename:="W:\GEBOUW\DATAHVD\Beheer\Beheer Energie
\-- Website updating--\Energy
section\All Graphs\2006 PieChart Electricity DAF Hi.jpg", _
FilterName:="jpeg"
ActiveSheet.ChartObjects("Grafiek 12").Activate
ActiveChart.ChartArea.Select
ActiveChart.Export Filename:="W:\GEBOUW\DATAHVD\Beheer\Beheer Energie
\-- Website updating--\Energy
section\All Graphs\2006 PieChart Gas DAF Hi.JPG", _
FilterName:="jpeg"
AND THE SAME FOR ALL OTHER 42 GRAPHS
Sheets("Macro blad").Select
Range("E19").Select
ActiveWorkbook.Save
End VBA code example
Does anyone have a solution?
(NOTE: i am a beginning VBA user)