LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 15
Default Extracting data from external pivot table - Office 2007

I have several Excel files, each of which are over 70MB xlsm files.
I need to get some data from the pivot tables in the above-mentioned files
based on specified file and other criteria in pivot table.

Does somebody know how to do this in VBA? I get error 1004 at set pt = line.
I know the line below it is wrong. But that is a moot point, since i can't
get to it.

I tried the following code but it does not work.

rangeAddr = "'" & filePath & "[" & FileName & "]" & sheetName & _
"'!A4"
Set pt = Range(rangeAddr).PivotTable
Worksheets("Sheet1").Range(Cells(i, j), Cells(i, j)).Value = _
pt.GetPivotData("Quantity", rangeAddr, "Transaction Type", _
Worksheets("Sheet1").Range(Cells(1, j), Cells(1, j)), "Chain Code", _
Worksheets("Sheet1").Range(Cells(2, j), Cells(2, j))).Value

Thanks much.
 
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
Office 2007 Pivot Table shortcut keys mrmnz Excel Discussion (Misc queries) 1 June 8th 09 05:50 AM
Office 2007 and Pivot Table Trouble Erika Excel Discussion (Misc queries) 1 May 30th 09 02:19 AM
Display top ten items in an Office 2007 pivot table JaneH Excel Discussion (Misc queries) 2 March 27th 09 04:22 PM
View pivot table external data source in Excel 2007 Marc Forget Excel Discussion (Misc queries) 4 January 10th 08 08:05 PM
Extracting saved data from pivot table Marcus Langell Excel Discussion (Misc queries) 2 March 8th 06 02:51 PM


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