Home > Unable To > Run-time Error '1004' Unable To Set The Currentpage Property Of The Pivotfield Class

Run-time Error '1004' Unable To Set The Currentpage Property Of The Pivotfield Class

Contents

Syntax expression .CurrentPage expression A variable that represents a PivotField object. What does the image on the back of the LotR discs represent? How to pass files found by find as arguments? with a . his comment is here

Plus, I also have two more pivots - 1 for the same date last month and one for the same date last year. I know it sounds strange, but it really happened. To start viewing messages, select the forum that you want to visit from the selection below. Change Filters in Same Pivot Table In this sample code, when you select a month from the report filter, the Quarters filter automatically changes, to show the quarter for the selected

Run-time Error '1004' Unable To Set The Currentpage Property Of The Pivotfield Class

On another sheet there are some PivotTables that evaluate the datasets. Private Sub Worksheet_SelectionChange(ByVal Target As Range) If Intersect(Target, Range("C3:C4")) Is Nothing Then Exit Sub Dim pt As PivotTable Dim Field As PivotField Dim NewCat As String Set pt = Worksheets("Pivot").PivotTables("PivotTable1") Set The user entered date will be in cell D11. Viewing 10 posts - 1 through 10 (of 10 total) Author Posts February 1, 2016 at 7:25 pm #3223 straberiwineParticipant Started: 2Replies: 14Total: 16 I am trying to get a date

Pasta1.xlsm (21.2 KB, 6 views) Excel Video Tutorials / Excel Dashboards Reports Reply With Quote Quick Navigation Excel General Top Site Areas Settings Private Messages Subscriptions Who's Online Search Forums: Forums OzGrid accepts no responsibility for ANY adverse effects as a result from downloading attached files. Subscribe to our monthly newsletter for tech news and trends Membership How it Works Gigs Live Careers Plans and Pricing For Business Become an Expert Resource Center About Us Who We Unable To Set The Currentpage Property Of The Pivotfield Class Olap Excel - Tips and Solutions for Excel Privacy Statement Terms of Service Top All times are GMT -4.

Ozgrid is Not Associated With Microsoft. This time, an error occured: Run-time error '1004': unable to get the PivotFields property of the PivotTable class. VB: Sub Test1() ActiveSheet.PivotTables("pvtTest").PivotFields("Week").ClearAllFilters ActiveSheet.PivotTables("pvtTest").PivotFields("Week").CurrentPage = _ ActiveSheet.Range("K1").Value End Sub Attached Files. http://www.ozgrid.com/forum/showthread.php?t=169855 vba excel-vba pivot-table powerpivot share|improve this question edited Jun 11 '15 at 14:18 asked Jun 11 '15 at 12:52 Breeze 1,015923 you use both "Datum" and "Date" fields names,

Do these physical parameters seem plausible? Vba Currentpage Multiple Items Not the answer you're looking for? Can I use my client's GPL software? PivotField.CurrentPage Property (Excel) Office 2013 and later Other Versions Office 2010 Contribute to this content Use GitHub to suggest and submit changes.

Field.currentpage = Newcat

This may be relevant as the VBA script seems to work fine when I do not select this option. –Robin A Jan 16 at 19:05 add a comment| Did you find New Features! Run-time Error '1004' Unable To Set The Currentpage Property Of The Pivotfield Class Solved VBA Error 1004 Unable to set the CurrentPage property of the PivotField class Posted on 2010-10-28 VB Script MS Excel Visual Basic Classic 1 Verified Solution 8 Comments 4,688 Views Field.currentpage = Newcat Error If somebody could explain why the error occurs or how to avoid it, I would be really happy.

Any suggestions? http://newmexicosupercomputer.com/unable-to/windows-was-unable-to-complete-the-format-usb.html I edited the question, thank you –Breeze Jun 11 '15 at 13:06 in which line your code stops due to 1004 error?? –KazimierzJawor Jun 11 '15 at 13:10 I receive the following error when attempting: Run-time error '1004' Unable to set the CurrentPage property of the PivotField class Code (vb): Private Sub Worksheet_SelectionChange(ByVal Target As Range) If Intersect(Target, Range("H5")) and this, worked just (Y), Ok, that's it, Another advise I can give you is to format your assigned value correctly before assigning it to the PivotField or PageField. Field.currentpage Error

It was because I was trying to reference the field without the PowerPivot field name. Before you post your first question, please read this short introduction guide. MenuExperts Exchange Browse BackBrowse Topics Open Questions Open Projects Solutions Members Articles Videos Courses Contribute Products BackProducts Gigs Live Careers Vendor Services Groups Website Testing Store Headlines Ask a Question Ask weblink It worked great.

We run the evaluation about twice a year. Xlcaptionequals Yes No Additional feedback? 1500 characters remaining Submit Skip this Thank you! The only changes that were made to the workbook are added rows.

Well to the point, My pivottable is as follows: Please Login or Register to view this content.

This worked find directly in spreadsheet (it updated all data, and no data duplication in PT), however while doing in VBA the same using somthing like: Please Login or Sampledoc.xlsm (21.1 KB, 50 views) Excel Video Tutorials / Excel Dashboards Reports Reply With Quote September 17th, 2012 #2 rory View Profile View Forum Posts Super M‌oderator Join Date 2nd May February 2, 2016 at 5:17 pm #3240 tomallanKeymaster Started: 7Replies: 1614Total: 1621 That makes sense. Pivotfilters.add Example Vba Do I need to do this?

We appreciate your feedback. In the workbook, to see the code, right-click the SalesPivot sheet tab, and click View Code. The time now is 01:45 AM. check over here If you select a different Quarter, the Months filter automatically changes to "(All)".

We appreciate your feedback. In the workbook, to see the code, right-click the OrderDates sheet tab, and click View Code. Private Sub Worksheet_SelectionChange(ByVal Target As Range) Dim KeyCells As Date KeyCells = ActiveSheet.Range("D11").Value If Not Intersect(Target, Range("D11")) Is Nothing Then ActiveSheet.PivotTables("ThisYear").PivotFields("[Data].[Date].[Date]").VisibleItemsList = Array("[Data].[Date].&[" & KeyCells & "]") End If End Sub You could try: Sub payment_look_up() Application.ScreenUpdating = False Sheets("PaymentLookUp").Select Dim x As String Dim pi As PivotItem x = Range("C1").Value Sheets("PaymentLookUp").Select For Each pi In ActiveSheet.PivotTables("PivotTable31").PivotFields("INVOICE").PivotItems

Read/write PivotItem. Then, in the pivot table on the new sheet, that sales rep's name is selected in the Report Filter. It was all in the formatting. Share Share this post on Digg Del.icio.us Technorati Twitter Microsoft MVP - Excel Reply With Quote Mar 9th, 2011,10:07 PM #3 wish2excel New Member Join Date Aug 2010 Posts 20 Re:

I need change data, and with this exemple doesnt works data (All) <-filter name Sum de grana andreia 74 antonio 85 bruno 10 carlhos 25 cassia 58 felippe 84 rogeio 63 I believe everything is working correctly up to line 11 which says "Field.CurrentPage = NewCat". Manual Sorting You can easily sort the pivot fields in the row or column areas, but there isn't a quick way to sort the report filter fields. This is where the issue lies.

Because every PivotTable has the same filters and the selected values should always be the same, the selection is copied to the other PivotTables as soon as they are applied to Automatic Sorting If you would prefer to sort report filter fields automatically, you can use the following VBA code.