如果图标有标题就输出标题;没有就输出序号
Sub test()
Dim path As String
Dim co As ChartObject
Dim ch As Chart
path = ThisWorkbook.path & "\"
For Each co In ActiveSheet.ChartObjects
Set ch = co.Chart
ch.Export path & IIf(ch.HasTitle, ch.ChartTitle.Text, "Chart_" & co.Index) & ".png"
Next
End Sub
Sub test()
Dim p As String
Dim sh As Worksheet
Dim co As ChartObject
p = ThisWorkbook.Path & "\"
For Each sh In Sheets
For Each co In sh.ChartObjects
co.Chart.Export p & sh.Name & "_Chart" & co.Index & ".png"
Next co
Next sh
End Sub