LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
mju mju is offline
external usenet poster
 
Posts: 29
Default remove/delete/hide/exclude all (Blanks) in a pivot table macro

Below is a sample of my code to remove all (blanks) in a pivot table.

With ActiveSheet.PivotTables("PivotTable1").PivotFields ("TRAD_PARTNER ")
.PivotItems("(blank)").Visible = False
End With
it works fine it there balnks in the pivot table.
However, sometimes if the data set does not have any (blank), the macro
generates a Run-time 1004 error. (Unable to get the PivotItems Property of
the PivotField class)
Is there a that i can skip the code if there are no (blank)?
I tried If statement but it did not work.

Thanks alot people:)-
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
hide or remove filter arrows from protected pivot table cm Excel Discussion (Misc queries) 0 September 23rd 09 10:23 PM
Pivot Table Macro, exclude possible blanks mcm52188 Excel Programming 0 April 27th 09 08:57 PM
Looking to remove pivot fields from pivot table via macro S Himmelrich Excel Programming 0 January 16th 09 03:49 PM
Remove Pivot Table Borders with Macro BJ Excel Programming 0 August 6th 08 06:24 PM
Pivot Table Macro (Show Hide) Andy Mo Excel Programming 0 October 10th 06 11:55 AM


All times are GMT +1. The time now is 11:32 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"