Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
When changing the cell values it changes the page filter for the OLAP
pivottable. I can select the date i want, but it will not clear the previous selection. So far any code i have tried has either not worked or resulted in an error, or selected all the dates and jumped out of the code without returning an error. Any Idea's ? Dim YTEMP As String 'Year Dim MTEMP As String 'Month Dim DTEMP As String ' Day Dim str As String Dim str2 As String Dim str3 As String str = Sheets("Days").Range("H1").Value str2 = Sheets("Days").Range("H2").Value 'Get values fron cell range str3 = Sheets("Days").Range("H3").Value YTEMP = str MTEMP = str2 'Store Variables to holders DTEMP = str3 'Apply filter ActiveSheet.PivotTables("DAYSA").PivotFields("[Date]").AddPageItem _ "[Date].[All].[" & YTEMP & "].[" & MTEMP & "].[" & DTEMP & "]" Thanks EI |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Pivot Table Code | Excel Discussion (Misc queries) | |||
Pivot Table Code | Excel Programming | |||
VBA Code for a pivot table to open database and to reference table current page | Excel Programming | |||
vba code for Pivot Table | Excel Programming | |||
HELP! Code for Pivot Table | Excel Programming |