Dim datasheet As Worksheet
Dim PT As PivotTable
Dim field As PivotField
Set datasheet = Sheets(1)
Set PT = datasheet.PivotTables("PivotTable2")
Set field = PT.PivotFields("Chapter_Desc")
field.ClearAllFilters
field.datasheet = "Georgia"
Set field = Nothing
Set PT = Nothing
我期望这将透视字段Chapter_Desc
过滤为Georgia
。
相反,它在field.datasheet = "Georgia
行给予我一个错误
对象不支持此属性或方法。
1条答案
按热度按时间6xfqseft1#
试试看