Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Error:Unable to set the visible property of the PivotItem class.
I got the error
Unable to set the visible property of the PivotItem class. when i try to set a pivotitem to visible: Dim PF As PivotField Dim PFI As PivotItem For Each PF In PFs Set PFs = ActiveSheet.PivotTables("PivotTable2").PivotFields For Each PFI In PF.HiddenItems PFI.Visible = True Next PFI Next PF is there any solution, I have found yet no such (only at http://www.experts-exchange.com/msof..._20275761.html , but they wanted me to register first...) Thanks Holger |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Error:Unable to set the visible property of the PivotItem class.
See Debra Dalgleish's site
http://www.contextures.com/xlPivot03.html Note that in her sample code she sets the autosort to manula before unhidding the item, so this must be some bug she is allowing for: Sub PivotShowItemAllVisible() 'sort is set to Manual to prevent errors, e.g. 'unable to set Visible Property of PivotItem class Dim pt As PivotTable Dim pf As PivotField Dim pi As PivotItem Application.ScreenUpdating = False Application.DisplayAlerts = False On Error Resume Next For Each pt In ActiveSheet.PivotTables For Each pf In pt.RowFields pf.AutoSort xlManual, pf.SourceName For Each pi In pf.PivotItems pi.Visible = True Next pi pf.AutoSort xlAscending, pf.SourceName Next pf Next pt Application.DisplayAlerts = True Application.ScreenUpdating = True End Sub -- Regards,Tom Ogilvy "Holger Pietsch" wrote in message ... I got the error Unable to set the visible property of the PivotItem class. when i try to set a pivotitem to visible: Dim PF As PivotField Dim PFI As PivotItem For Each PF In PFs Set PFs = ActiveSheet.PivotTables("PivotTable2").PivotFields For Each PFI In PF.HiddenItems PFI.Visible = True Next PFI Next PF is there any solution, I have found yet no such (only at http://www.experts-exchange.com/msof..._20275761.html , but they wanted me to register first...) Thanks Holger |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Error:Unable to set the visible property of the PivotItem clas
Hi Tom,
the example works fine. I am now trying to get my stuff running. Thanks a lot. Holger "Tom Ogilvy" wrote: See Debra Dalgleish's site http://www.contextures.com/xlPivot03.html Note that in her sample code she sets the autosort to manula before unhidding the item, so this must be some bug she is allowing for: Sub PivotShowItemAllVisible() 'sort is set to Manual to prevent errors, e.g. 'unable to set Visible Property of PivotItem class Dim pt As PivotTable Dim pf As PivotField Dim pi As PivotItem Application.ScreenUpdating = False Application.DisplayAlerts = False On Error Resume Next For Each pt In ActiveSheet.PivotTables For Each pf In pt.RowFields pf.AutoSort xlManual, pf.SourceName For Each pi In pf.PivotItems pi.Visible = True Next pi pf.AutoSort xlAscending, pf.SourceName Next pf Next pt Application.DisplayAlerts = True Application.ScreenUpdating = True End Sub -- Regards,Tom Ogilvy "Holger Pietsch" wrote in message ... I got the error Unable to set the visible property of the PivotItem class. when i try to set a pivotitem to visible: Dim PF As PivotField Dim PFI As PivotItem For Each PF In PFs Set PFs = ActiveSheet.PivotTables("PivotTable2").PivotFields For Each PFI In PF.HiddenItems PFI.Visible = True Next PFI Next PF is there any solution, I have found yet no such (only at http://www.experts-exchange.com/msof..._20275761.html , but they wanted me to register first...) Thanks Holger |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
VBA error: Unable to set the Values property of the Series class | Excel Programming | |||
Unable to set the NumberFormat Property of the Range Class - ERROR | Excel Programming | |||
Error: Unable to get the OLEObjects property of the worksheet class | Excel Programming | |||
Run-time error '1004' - Unable to set the Visible property of the Worksheet class | Excel Programming | |||
Unable to set the colorIndex Property of the Interior Class Error | Excel Programming |