List members in Dimension (Pivot table field)

R

Rickard

I'm using Excel XP and Pivot tables as an OLAP front-end. I now want
to list all members in a specific Dimension (Pivot table field), and
finally add them to a Combo box. I think it's possible to do with DSO,
but is it possible to do it directly from the Pivot table?

Rickard
 
T

Tom Ogilvy

Private Sub CommandButton2_Click()
Dim pvtItem As PivotItem

For Each pvtItem In Worksheets("Pivot1") _
.PivotTables("PivotTable1").PivotFields("Header1") _
.PivotItems
UserForm1.ComboBox1.AddItem pvtItem.Value
Next

End Sub


Works with a standard pivot table. You would have to check it with a pivot
table fed by an OLAP cube as the pivot table depends on the Cube to do a lot
of the processing.
 

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