I have seen plenty of code that loops through's in an individual worksheet, however I am trying to loop through charts that are individual sheets in the workbook. My code is as follows (as you can see I am simply trying to save the charts as PDFs):
Sub ExportAllCharts()
Dim Current As Worksheet
' Loop through all of the worksheets in the active workbook.
For Each Current In Worksheets
If TypeName(Current) = "Chart" Then
objCht.ExportAsFixedFormat xlTypePDF, Filename:= _
"c:/" & Current.Name, Quality:=xlQualityStandard, _
IncludeDocProperties:=True, IgnorePrintAreas:=False, OpenAfterPublish:=False
End If
Next
End Sub
Unfortunately, when the code loops through all the sheets in the workbook, for some reason it is skipping the charts. Is there an equivalent to Worksheets
that applies to individual charts in Excel? Or is there perhaps another way of doing this that I haven't thought of?
Thanks! David