Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
With VBA I like to add some shapes/text to a Pivotchart. The text
items are part of the pivottable sourcedata table. With VBA I need to identify the worksheet which contains the sourcedata. I'm wondering whether is any easy way to get a handle to this sourcedata worksheet. If not I would need to analyze the sourcedata string and write a function that would be using some text functions to retrieve the worksheet name out of the sourcedata string. This would get even more complicated when the sourcedata string is a dynamic named range. Anybody an idea how this could be done in a more easy way Dim pt As PivotTable Dim ws As Worksheet Set pt = ActiveChart.PivotLayout.PivotTable ' no problem to get the pivottable Set ws = Range(pt.SourceData).Parent ' I believe this does not work because the worksheet is not identified for the range method. Chicken and egg situation. |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
how do i get get worksheet name for pivottable sourcedata whenworking on pivotchart | Excel Programming | |||
HOW TO: PivotTable.SourceData | Excel Programming | |||
HOW TO: PivotTable.SourceData | Excel Programming | |||
How to use ADO to change Pivottable sourcedata query | Excel Programming | |||
Change SourceData in Excel PivotTable via VBA | Excel Programming |