PivotTable Error 1004

paugleza

New Member
Joined
Jul 25, 2023
Messages
1
Office Version
  1. 365
Platform
  1. Windows
I have a database, where I later made a dynamic table in which I have a column with the weeks of the year...

When I record a macro the following code is saved....

ActiveSheet.PivotTables("OVERALL").PivotFields("WEEK").ClearAllFilters
ActiveSheet.PivotTables("OVERALL").PivotFields("WEEK").CurrentPage = "19"

So if I try to run the macro again, an error occurs ( 1004, undefined application or objetc)

What can be?
 

Excel Facts

Can Excel fill bagel flavors?
You can teach Excel a new custom list. Type the list in cells, File, Options, Advanced, Edit Custom Lists, Import, OK
Hi and welcome to MrExcel.

You must ensure that the value 19 exists in the data of the "WEEK" field.

And the "WEEK" field is checked to display in the Report Filter area.

;)
 
Upvote 0

Forum statistics

Threads
1,215,143
Messages
6,123,277
Members
449,093
Latest member
Vincent Khandagale

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top