我想知道是否可以直接显示请求而不必将它们分组?组之前出现的默认查询的示例。 (没有应用)(如果可能)。
门户示例:
Sub ChartList()
Dim objNewWorkbook As Workbook
Dim objNewWorksheet As Worksheet
Dim wks As Worksheet
Dim cht As ChartObject
Dim i As Long
Set objNewWorkbook = Excel.Application.Workbooks.Add
Set objNewWorksheet = objNewWorkbook.Sheets(1)
i = 1
For Each wks In ThisWorkbook.Worksheets
objNewWorksheet.Cells(i, 1) = wks.Index
objNewWorksheet.Cells(i, 2) = wks.Name
If wks.ChartObjects.Count > 0 Then
For Each cht In wks.ChartObjects
objNewWorksheet.Cells(i, 3) = cht.Chart.ChartTitle.Text
i = i + 1
Next cht
End If
i = i + 1
Next wks
End Sub
先谢谢您