Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
accessing pivot talbes using dom
Hi:
How can I enumerate all he pivot tables in a work book using the dom/vb code? Cheers Sean. |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
accessing pivot talbes using dom
Hi Sean,
Below is the vba code that you can use to walk through each PT in a workbook. Sub enumeratePT() Dim ws As Worksheet Dim pt As PivotTable For Each ws In ThisWorkbook.Worksheets If ws.Visible = xlSheetVisible Then ws.Select For Each pt In ws.PivotTables Debug.Print pt.Name ' pt.PageFields("COLUMN1").DataRange = "VALID VALUE IN COLUMN1" ' pt.PageFields("COLUMN2").DataRange = "VALID VALUE IN COLUMN2" Next pt End If Next End Sub Hong Quach "Sean Farrow" wrote: Hi: How can I enumerate all he pivot tables in a work book using the dom/vb code? Cheers Sean. |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
accessing pivot talbes using dom
Hi:
Just what I needed. Sean. "Hong Quach" wrote in message ... Hi Sean, Below is the vba code that you can use to walk through each PT in a workbook. Sub enumeratePT() Dim ws As Worksheet Dim pt As PivotTable For Each ws In ThisWorkbook.Worksheets If ws.Visible = xlSheetVisible Then ws.Select For Each pt In ws.PivotTables Debug.Print pt.Name ' pt.PageFields("COLUMN1").DataRange = "VALID VALUE IN COLUMN1" ' pt.PageFields("COLUMN2").DataRange = "VALID VALUE IN COLUMN2" Next pt End If Next End Sub Hong Quach "Sean Farrow" wrote: Hi: How can I enumerate all he pivot tables in a work book using the dom/vb code? Cheers Sean. |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
problem accessing Pivot table Excel 2007 | Excel Worksheet Functions | |||
Pivot table accessing external data | Excel Discussion (Misc queries) | |||
Accessing data in pivot tables | Excel Programming | |||
Accessing Pivot Table's Data in VBA | Excel Programming | |||
Accessing Pivot Table's Data | Excel Programming |