#1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 492
Default Pivot Table

Hi,

Sheet3.PivotTables("PivotTable2").PivotFields("Typ e").CurrentPage = _
"Intercooler"

I have a macro which links to nine other workbooks which are identical
in layout. The macro loops through all nine workbooks and enters data from
the same place in each workbook into Sheet1 in my workbook. I have a Pivot
Table (which is refreshed each time in the loop) using this data, and a
print routine that prints the data from all nine workbooks, the idea being
to automate printing a daily report from each location.
In the piece of code above, "Intercooler" is one of a hundred or so
items that show in the Pivot Table dropdown list. My question is :- Is it
possible to have "Intercooler" inserted in the code via a cell value in the
worksheet in a similar way to for example

Range([A1]).Copy

My aim is to use a Combobox in my workbook to select the category to
print so that I don't have to alter the code if a different category is
required,

Any advice much appreciated,

Regards,

Alan.

Windows XP Pro
Office XP Pro




  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default Pivot Table

Not sure of your design but why not use the combo box already provided by the pivot. Anyway, if I understand your question, I'd do it like this on the combo change event:

Sub DropDown1.Change()
ActiveSheet.Shapes("Drop Down 1").Select

Sheet3.PivotTables("PivotTable2").PivotFields("Typ e").CurrentPage = _
selection.list(selection.listindex)
End Sub

"Alan" wrote:

Hi,

Sheet3.PivotTables("PivotTable2").PivotFields("Typ e").CurrentPage = _
"Intercooler"

I have a macro which links to nine other workbooks which are identical
in layout. The macro loops through all nine workbooks and enters data from
the same place in each workbook into Sheet1 in my workbook. I have a Pivot
Table (which is refreshed each time in the loop) using this data, and a
print routine that prints the data from all nine workbooks, the idea being
to automate printing a daily report from each location.
In the piece of code above, "Intercooler" is one of a hundred or so
items that show in the Pivot Table dropdown list. My question is :- Is it
possible to have "Intercooler" inserted in the code via a cell value in the
worksheet in a similar way to for example

Range([A1]).Copy

My aim is to use a Combobox in my workbook to select the category to
print so that I don't have to alter the code if a different category is
required,

Any advice much appreciated,

Regards,

Alan.

Windows XP Pro
Office XP Pro





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
how to create pivot table from existing pivot table in excel 2007 Udayraj Dhulekar Excel Discussion (Misc queries) 2 July 8th 13 08:22 PM
Print Pivot Table headers on pages with Pivot Table tsgoose Excel Worksheet Functions 0 December 9th 08 08:14 PM
Copying values from pivot table to cells outside pivot table richzip Excel Discussion (Misc queries) 4 January 16th 08 11:03 PM
Filter lines with Pivot table and non pivot table columns Grover Charts and Charting in Excel 4 September 28th 07 03:16 AM
Help required with setting up a pivot table with the source on sheet1 to have the pivot table created on sheet called "report" Diana[_5_] Excel Programming 0 August 21st 03 10:19 PM


All times are GMT +1. The time now is 03:14 AM.

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"