Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default 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
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 cannot group selection Marion Excel Discussion (Misc queries) 9 January 24th 10 01:58 AM
Pivot Table Selection Sandeep Jangra[_2_] Excel Discussion (Misc queries) 2 October 10th 08 05:32 PM
Automate pivot table selection Steve Excel Discussion (Misc queries) 0 July 17th 08 11:34 AM
Pivot table colums selection Bill New Users to Excel 1 January 15th 07 05:54 PM
pivot table selection bayanbaru Excel Worksheet Functions 0 June 28th 05 01:21 AM


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