Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
PivotTable selection
Hi,
I've created a PivotTable using code and I can't seem to find a way to actually select it after it's done (hence, also display the PivotTable Field List) other than selecting a cell within my PivotTable. Is there a function somewhere that would select the newly created PivotTable no matter where it's residing on the sheet? Thanks, SC BTW, here's a sample of my code if it helps: Dim oPivot As PivotTable With ActiveWorkbook.PivotCaches.Add (SourceType:=xlExternal) .Connection = {...} 'CreatePivotTable parameters order: TableDestination, TableName, ReadData, DefaultVersion Set oPivot = .CreatePivotTable("[beh_gui.xls]Data! R3C2", "BEHPivotTable", , xlPivotTableVersion10) End With oPivot.AddDataField oPivot.PivotFields("Value"), "Total Value", xlSum What should come next? For the moment, I have this: oPivot.EnableFieldList = True ActiveWorkbook.Sheets(2).Activate ActiveWorkbook.Sheets(2).Range("B3").Select |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Limiting selection in a cell AND linking that selection to a list | Excel Discussion (Misc queries) | |||
Cannot Group that Selection error in PivotTable | Excel Discussion (Misc queries) | |||
Creating a PivotTable w/o selecting data in an existing PivotTable | Excel Discussion (Misc queries) | |||
Copy Selection - Transpose Selection - Delete Selection | Excel Discussion (Misc queries) | |||
Dynamic Selection of Pivottable Drop Down Items | Excel Programming |