Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

PivotFiled.Hidden is being stubbron

Status
Not open for further replies.

blairacuda

Technical User
Sep 3, 2009
51
US
Hello All,

I have a PivotTable that is not allowing me to hides its PivotFields.

Here is my code for the hide:

For Each Pf In Pt.PivotFields
temp = Pf.Name
If temp = "Description" Then
Pf.Hidden = True
End If
Next

When the hidden flag attempts to change I get: Run-time error '1004': Application-defined or object-defined error.

Can someone help to lead me in the right direction? I am new to Pivots and for some reason this just is not working for me.

Thanks in advance.

CBlair
Crystal, InstallShield, branching out in other programming realms.
 


hi,

Is this an OLAP?

from VBA Help...
This property is applicable only to levels of OLAP hierarchies.

Skip,
[sub]
[glasses]Just traded in my old subtlety...
for a NUANCE![tongue][/sub]
 
I am honestly not sure of that... I'm guessing the aren't? So assuming they aren't for now, how would I hide fields that I don't want other than removing them from the source data?

CBlair
Crystal, InstallShield, branching out in other programming realms.
 



One of the slickest tools that you have at your disposal, is the Macro Recorder.

Record what you want to do and then look at the code to see how it can be accomplished in VBA.

I found an answer that way.

Skip,
[sub]
[glasses]Just traded in my old subtlety...
for a NUANCE![tongue][/sub]
 
excellent advice. i'll look into that route. thanks!

CBlair
Crystal, InstallShield, branching out in other programming realms.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top