使用vba取消选择数据透视表中的所有项目 [英] Deselect all items in a pivot table using vba
本文介绍了使用vba取消选择数据透视表中的所有项目的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
有些人可以简单的解释一个新创建的数据透视表中的所有项目,以便我可以返回并选择一个或两个项目?我尝试了以下内容:
.PivotItems((全选))Visible = False
$ 解决方案这个可能是最接近你想要的:
Dim i As Long
.PivotItems(1)。 Visible = True
For i = 2 To .PivotItems.Count
.PivotItems(i).Visible = False
Next
这将使第一个选项成为唯一选择的选项(假设这是一个指向pivotfield的内容)。如果你知道你想要的手...修改相应的。
Can some quicly explain the way to deselect all items in a newly created pivot table so that I can go back and select only one or two items? I tried the following:
.PivotItems("(Select All)").Visible = False
Thanks.
解决方案 This is probably the closest you can get to what you want:
Dim i As Long
.PivotItems(1).Visible = True
For i = 2 To .PivotItems.Count
.PivotItems(i).Visible = False
Next
This will make the very first option the only selected option (assuming this is within a with that points to the pivotfield). If you know what you want before hand... modify accordingly.
这篇关于使用vba取消选择数据透视表中的所有项目的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文