[VBA] Check/TIck the selected Item List in Pivot Table

S

Sphenix

Sub Macro21()
'
' Macro21 Macro
' Macro recorded 18/01/2007 by Bank NISP
'

'

ActiveSheet.PivotTables("PivotTable1").CubeFields(2).TreeviewControl.Drilled
= _
Array(Array(""), Array("[H2ACC].[TX_DT].[All H2ACC].[2006]"),
Array( _
"[H2ACC].[TX_DT].[All H2ACC].[2006].[11]"))

ActiveSheet.PivotTables("PivotTable1").PivotFields("[H2ACC].[TX_DT].[Year]").
_
HiddenItemsList = Array("")

ActiveSheet.PivotTables("PivotTable1").PivotFields("[H2ACC].[TX_DT].[Month]").
_
HiddenItemsList = Array("[H2ACC].[TX_DT].[All
H2ACC].[2006].[10]")

ActiveSheet.PivotTables("PivotTable1").PivotFields("[H2ACC].[TX_DT].[Day]").
_
HiddenItemsList = Array("[H2ACC].[TX_DT].[All
H2ACC].[2006].[11].[16]", _
"[H2ACC].[TX_DT].[All H2ACC].[2006].[11].[17]", _
"[H2ACC].[TX_DT].[All H2ACC].[2006].[11].[18]", _
"[H2ACC].[TX_DT].[All H2ACC].[2006].[11].[19]", _
"[H2ACC].[TX_DT].[All H2ACC].[2006].[11].[20]", _
"[H2ACC].[TX_DT].[All H2ACC].[2006].[11].[21]", _
"[H2ACC].[TX_DT].[All H2ACC].[2006].[11].[24]", _
"[H2ACC].[TX_DT].[All H2ACC].[2006].[11].[25]")
End Sub

I have checked "[H2ACC].[TX_DT].[All H2ACC].[2006].[11].[22]" &
"[H2ACC].[TX_DT].[All H2ACC].[2006].[11].[23]"
and this is what i got in macro, but instead I want the VB code select
22 & 23 only instead uncheck.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top