Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Pivot table selection
Hi all,
I am using pivot tables that talkes to a OLAP cube. The sheet shows information like this: Project Plan ------- ----- ProjectA $200 ProjectB $300 ProjectC $500 Can I pass the project name as input to this workbook so that when this sheet opens up it shows only one project that was requested. Something like this: Run excel projectinfo.xls 'projectb' , should open this excel sheet with just "ProjectB", like this: Project Plan ------- ----- ProjectB $300 I have this code (got from this group): Private Sub Workbook_Open() ActiveSheet.PivotTables("PivotTable1"). _ PivotFields("Project").CurrentPage = "ProjectB" End Sub My questions: -------------- (1) This code as such doesnt work, I get a error like this: run-time error '1004': unable to get the pivotfields property of the pivottable class (2) How can I pass a string to Workbook_Open() so that project that needs to be shown is passed as a parameter ? (3) Is there a good book by which I can learn Pivot table VBA programming ? Thanks, John |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
pivot table cannot group selection | Excel Discussion (Misc queries) | |||
Pivot Table Selection | Excel Discussion (Misc queries) | |||
Automate pivot table selection | Excel Discussion (Misc queries) | |||
Pivot table colums selection | New Users to Excel | |||
pivot table selection | Excel Worksheet Functions |