View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Tom Ogilvy Tom Ogilvy is offline
external usenet poster
 
Posts: 27,285
Default Changing a pivot table field items to current database

Do you mean "ALL"

--
Regards,
Tom Ogilvy

"Pete Straman Straman via OfficeKB.com" wrote in
message ...
I recorded a macro that included showing a pivot field item.
I have to run the macro on different databases that have a unique field
item. There is only one field name in the field in a drop down box. How

can
I change the code below to show the field item that is established when
creating the pivot table not the one that was created when I recorded

macro

ActiveSheet.PivotTables("PivotTable1").PivotFields ("facilityid")
.CurrentPage = "60172"

When I run the macro on the next database in the current page maybe 60173,
60174, ... My macro will get a run time error because it can not find the
60172 item.

Hope this makes some sense and someone can help.

Thanks in advance.

C. Pete Straman

--
Message posted via http://www.officekb.com