JMorrison619
New Member
- Joined
- Mar 2, 2010
- Messages
- 3
Hello,
I was wondering if it's possible to update a filter in a pivot table (with source information coming from an OLAP cube) simply by selecting a choice in a drop down list that is identical to the choices you can filter by. I know that it is possible to filter a pivot table that has it's source data within the workbook by using the following VBA code:
Private Sub Worksheet_Change(ByVal Target As Range)
If Intersect(Target, Range("B5")) Is Nothing Then
Exit Sub
Else
Dim pt As PivotTable
For Each pt In ThisWorkbook.ActiveSheet.PivotTables
pt.PivotFields("Community Short Name").CurrentPage _
= Range("B5").Value
Next
End If
End Sub
I just get the error "Unable to get the PivotFields property of the PivotTable class" when I try to do the same things with the OLAP cube.
Thanks for any help you can provide.
Jimmy
I was wondering if it's possible to update a filter in a pivot table (with source information coming from an OLAP cube) simply by selecting a choice in a drop down list that is identical to the choices you can filter by. I know that it is possible to filter a pivot table that has it's source data within the workbook by using the following VBA code:
Private Sub Worksheet_Change(ByVal Target As Range)
If Intersect(Target, Range("B5")) Is Nothing Then
Exit Sub
Else
Dim pt As PivotTable
For Each pt In ThisWorkbook.ActiveSheet.PivotTables
pt.PivotFields("Community Short Name").CurrentPage _
= Range("B5").Value
Next
End If
End Sub
I just get the error "Unable to get the PivotFields property of the PivotTable class" when I try to do the same things with the OLAP cube.
Thanks for any help you can provide.
Jimmy