njskatchmo
New Member
- Joined
- Mar 29, 2011
- Messages
- 13
I am trying to export graphs from a workbook that are each on their own worksheet. I am using the following code:
Sub ExportImages2()
Dim oCht As Chart
Set oCht = Chart1
On erRROR GoTo Err_Chart
oCht.Export Filename:="H:\MyDocuments\GovExp.png", Filtername:="png"
Err_Chart:
If Err <> 0 Then
Debug.Print Err.Description
Err.Clear
End If
End Sub
When I export the graph, it seems to select the dimensions randomly. How can I set the image size to be 800x600?
Sub ExportImages2()
Dim oCht As Chart
Set oCht = Chart1
On erRROR GoTo Err_Chart
oCht.Export Filename:="H:\MyDocuments\GovExp.png", Filtername:="png"
Err_Chart:
If Err <> 0 Then
Debug.Print Err.Description
Err.Clear
End If
End Sub
When I export the graph, it seems to select the dimensions randomly. How can I set the image size to be 800x600?