P
Paul Mac.
Hi All,
I have a quick questions that I believe can be answered
quickly.
I have a PivotTable with the following Pivot Fields:
GROUP
NAME
DIV
What I'm wondering is whether I can select a Pivot Item
from a combination of two fields values. For instance, I
need to add items to a new collection where the item in
the "GROUP" field matches a previously selected value.
In simplist form, i need to add all items in the "NAME"
field where the "GROUP" field matches the previously
selected value.
I'm sure that the items index will help, but i can only
stay within the nominated pivot field.
Sample Code: (If it helps)
Set oPiv = frmNewProgramDetails.oPiv ' From Unfocused
Form)
oSelectedGroup = frmNewProgramDetails.cmbGroup ' Value to
match
For Each Item In oPiv.PivotFields("NAME").PivotItems
If oPiv.PivotField("GROUP").PivotItem(Item) =
oSelectedGroup Then
'I want it to add to the colListItems only if the "GROUP"
= oSelectedGroup
colListItems.Add Item
End If
Next Item
Hope someone can shed some light on this.
Thanks in advance,
Paul Mac
I have a quick questions that I believe can be answered
quickly.
I have a PivotTable with the following Pivot Fields:
GROUP
NAME
DIV
What I'm wondering is whether I can select a Pivot Item
from a combination of two fields values. For instance, I
need to add items to a new collection where the item in
the "GROUP" field matches a previously selected value.
In simplist form, i need to add all items in the "NAME"
field where the "GROUP" field matches the previously
selected value.
I'm sure that the items index will help, but i can only
stay within the nominated pivot field.
Sample Code: (If it helps)
Set oPiv = frmNewProgramDetails.oPiv ' From Unfocused
Form)
oSelectedGroup = frmNewProgramDetails.cmbGroup ' Value to
match
For Each Item In oPiv.PivotFields("NAME").PivotItems
If oPiv.PivotField("GROUP").PivotItem(Item) =
oSelectedGroup Then
'I want it to add to the colListItems only if the "GROUP"
= oSelectedGroup
colListItems.Add Item
End If
Next Item
Hope someone can shed some light on this.
Thanks in advance,
Paul Mac