OLAP Pivot Function

J

Jeff C

I am new to working with OLAPs in Excel. I am having trouble with the
following whihc will not run no matter how I modify it. Can someone point me
in the right direction or tell me if this just won't work when querying OLAP
Pivots.

I have multiple Pivots and am trying to change the page source.

Sub newFAC()


Dim strfac As String

strfac = Range("DD2")


ActiveSheet.PivotTables("Cases").PivotFields("[Dim Facility].[Facility
Name]").CurrentPageName = "[Dim Facility].[Facility Name]." &
Range("DD2").Text


End Sub

Range("DD2") changes based on the selection in a combo box.

Thanks in advance.
 
J

Jeff C

--
Jeff C
Live Well .. Be Happy In All You Do


Jeff C said:
I am new to working with OLAPs in Excel. I am having trouble with the
following whihc will not run no matter how I modify it. Can someone point me
in the right direction or tell me if this just won't work when querying OLAP
Pivots.

I have multiple Pivots and am trying to change the page source.

Sub newFAC()


Dim strfac As String

strfac = Range("DD2")


ActiveSheet.PivotTables("Cases").PivotFields("[Dim Facility].[Facility
Name]").CurrentPageName = "[Dim Facility].[Facility Name]." &
Range("DD2").Text


End Sub

Range("DD2") changes based on the selection in a combo box.

Thanks in advance.

Tried this:

ActiveSheet.PivotTables("Cases").PivotFields("[Dim Facility].[Facility
Name]").CurrentPageName = "[Dim Facility].[Facility Name].[" & strfac & "]"

I get an "unable to get PivotTables property of the worksheet class" error

can anyone help?
 

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