Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Pivot Table Automation
I was hoping that someone could give me some direction.
I have a pivot table in a main sheet. The data is from another excel sheet in another file. The data file's name and length may change. For example: the file name may change from "data 06-30" to "data 07-07"; the rows containing data may change from 1000 to 1020. How to use Macro to automatically update the pivot table from the periodically changing datasource? Thanks for any help. Jon |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Pivot Table Automation
I tried below program, but it doesn't work. Can someone help me? Thanks.
Sub LoadData() Dim pv As PivotTable Dim FileName As String FileName = Application.GetOpenFilename For Each pv In ThisWorkbook.Sheets("Sheet4").PivotTables pv.SourceData = "'U:\Projects\5-Macrotize Reports\[" & FileName & "]Sheet1'!A1:O30000" Next End Sub "Jonathan" wrote: I was hoping that someone could give me some direction. I have a pivot table in a main sheet. The data is from another excel sheet in another file. The data file's name and length may change. For example: the file name may change from "data 06-30" to "data 07-07"; the rows containing data may change from 1000 to 1020. How to use Macro to automatically update the pivot table from the periodically changing datasource? Thanks for any help. Jon |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
reference table automation | Excel Worksheet Functions | |||
Help with Table Automation | Excel Discussion (Misc queries) | |||
problem with pivot table automation using perl | Excel Programming | |||
Pivot Table Vba Automation In 2002 | Excel Programming | |||
Pivot Table Automation Questions | Excel Programming |