Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Pivot Table Macro (Show Hide)

Hi everybody,

I have pivot table with about 150 rows in each representing a course at
a college. I want to be able to show 1 of 3 faculties (arts,
humanities, Sciences) at the click of a button.

I tried recording a macro of me showing only the relevant courses, but
it only works on the sheet i recorded it on. I want it to be generic so
it will work on the active sheet. (there are 14 sheets in total)

So how would i make something like this work on any sheet (the
PivotFields("Courses") are the same throughout the workbook)

Sub tbArts()

With ActiveSheet.PivotTables("PivotTable11").PivotField s("Courses")
.PivotItems("Biology (Salters)").Visible = False
.PivotItems("Business & Finance (Applied)").Visible = False
.PivotItems("Business & Finance (VCE)").Visible = False
End With
End Sub

Ive tried clutching at straws using things like:

With ActiveSheet.PivotTables.PivotFields("Courses")

With ActiveSheet.PivotTable.PivotFields("Courses")
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
Pivot Table - Disable the Show/Hide Detail upon refresh Vicki Excel Discussion (Misc queries) 0 November 15th 06 09:47 PM
Looking for gurus that knows show and hide functions on a pivot table? [email protected] Excel Worksheet Functions 0 September 3rd 06 05:25 PM
Pivot table Data area show/hide behavior Peter Ross Excel Discussion (Misc queries) 0 January 20th 06 10:37 PM
How to show/hide range of Month on Pivot Table [email protected] Excel Discussion (Misc queries) 0 January 9th 06 06:54 PM
pivot table - hide details but show subtotal for calculated field tenneym Excel Discussion (Misc queries) 1 February 9th 05 03:07 AM


All times are GMT +1. The time now is 07:47 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"