Hi,
I just started Excel programming last week. I did some research online and I found out that we need to use the Export method to save charts as jpgs.
Here's the code I wrote but it's giving me an error saying
Runtime error: '438'
Object doesn't support this property or method
Here's the code snippet:
Hope someone can help me. Thanks!Code:Public Sub ExportChartsToJpegs() Worksheets("TotBklg").ChartObjects("chart 1").Export Filename:="C:\DefectQuery\FEP4\Current\TotalBacklog" & FName & ".jpg", FilterName:="JPG" End Sub
It's the Chart object that has the export method rather than the chartobject
Code:Public Sub ExportChartsToJpegs() Worksheets("TotBklg").ChartObjects("chart 1").Chart.Export Filename:="C:\DefectQuery\FEP4\Current\TotalBacklog" & FName & ".jpg", FilterName:="JPG" End Sub
Great! Thank you so much.
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks