LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 49
Default how to set pivotitem.visible property to true

I use the following code:

Public Sub ResetFilters()

Dim pvtTable As PivotTable
Dim pvtField As PivotField
Dim pvtItem As PivotItem

Set pvtTable = ActiveSheet.PivotTables("afsct")

For Each pvtField In pvtTable.PivotFields
pvtField.AutoSort xlManual, pvtField.SourceName
For Each pvtItem In pvtField.PivotItems
If Not pvtItem.Visible Then pvtItem.Visible = True
Next
pvtField.AutoSort xlAscending, pvtField.SourceName
Next

End Sub


This gives an error 1004 on the line with pvtField.AutoSort:
Door de toepassing of door object gedefinieerde fout
(by the application or by object defined error)


When I comment the two pvtField.AutoSort lines, I get an error 1004:
Eigenschap Visible van klasse PivotItem kan niet worden ingesteld.
(property Visible of class PivotItem cannot be set)

What am I missing here?

--
Amedee
 
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
Unable to set the visible property of the PivotItem class JimRWR Excel Programming 3 May 3rd 07 09:06 PM
Error:Unable to set the visible property of the PivotItem class. Holger Pietsch Excel Programming 2 August 16th 05 05:11 PM
PivotItem.Visible Excelgeek Excel Programming 2 June 14th 05 11:23 PM
how to set pivotitem.visible property to true kanan Excel Programming 0 February 25th 04 08:06 PM
How can I set PivotItem.Visible property to True? yumi Excel Programming 2 February 19th 04 11:51 AM


All times are GMT +1. The time now is 05:00 AM.

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"