Does anyone know the correct syntax to use to retrieve data using the PivotTable.getData( ..... ) command? What goes between the parenthesis?
Thanks!
Printable View
Does anyone know the correct syntax to use to retrieve data using the PivotTable.getData( ..... ) command? What goes between the parenthesis?
Thanks!
If you type GetData in a macro module and press the F1 key you will get help for this.
There isn't a concrete example on the syntax.
So far I've been about to get some data from
pvtTable.GetData(" 'MyDataFieldName' 'myVariableToLookFor' ")
with just a space between the two things to look for. The problem is when I want to specify more than just one category for the get data.
For example, say myDataField is a Date field and currently there is just April drilled-down to the days. If I want to look up the corresponding data for April 4th, I could do this:
pvtTable.GetData(" 'MyDataFieldName' '4' ") and it shows me the data for April 4th. Also I could use
pvtTable.GetData(" 'MyDataFieldName' 'April' '4' ") and it works.
However if I now have April and May drilled down to the days and I want to look up the data for April 4th, I would think that using
pvtTable.GetData(" 'MyDataFieldName' 'April' '4' ") would work again, but it does not. Neither does using the first example again. It gets confused because the member 4 is not unique.
Any thoughts?