Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 260
Default Code not working

Hey guys

Code used to work, now doesnt since I made a change...

This code goes through each pivot field in the data sector
of a pivot table. It hides each pivotfield. Currently in
the below example, the value of variable "pvtfield"
is "Percent Overdue". I looked in the pivot table and
this is a pivotfield name(One I added manually which I
will explain in a minuye). The only difference this time
than before, is this time the field is a calculated field
(where I had to right click on the pivot table, select
formulas, and click calculated field). But I called it
the exact same name as I did before I did this.

Set PvtTable = Worksheets("Reps Current").PivotTables
("PivotTable1")
For Each pvtfield In PvtTable.DataFields
pvtfield.Orientation = xlHidden
Next pvtfield
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,885
Default Code not working

Hi
see your other posts

--
Regards
Frank Kabel
Frankfurt, Germany


Todd Huttenstine wrote:
Hey guys

Code used to work, now doesnt since I made a change...

This code goes through each pivot field in the data sector
of a pivot table. It hides each pivotfield. Currently in
the below example, the value of variable "pvtfield"
is "Percent Overdue". I looked in the pivot table and
this is a pivotfield name(One I added manually which I
will explain in a minuye). The only difference this time
than before, is this time the field is a calculated field
(where I had to right click on the pivot table, select
formulas, and click calculated field). But I called it
the exact same name as I did before I did this.

Set PvtTable = Worksheets("Reps Current").PivotTables
("PivotTable1")
For Each pvtfield In PvtTable.DataFields
pvtfield.Orientation = xlHidden
Next pvtfield

Reply
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
VB Code Is Not Working Rob Excel Discussion (Misc queries) 2 May 30th 07 05:23 PM
Code not working and can't see why Steve Excel Discussion (Misc queries) 3 December 31st 04 03:12 PM
Vb Code not working bob Excel Programming 3 January 5th 04 01:29 PM
why this code not working tj Excel Programming 0 September 2nd 03 07:14 PM
Code not working Bob Phillips[_5_] Excel Programming 5 August 14th 03 03:12 PM


All times are GMT +1. The time now is 08:40 PM.

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

About Us

"It's about Microsoft Excel"