Results 1 to 3 of 3

Thread: excel vba getData

  1. #1

    Thread Starter
    New Member
    Join Date
    May 2004
    Posts
    2

    excel vba getData

    Does anyone know the correct syntax to use to retrieve data using the PivotTable.getData( ..... ) command? What goes between the parenthesis?


    Thanks!

  2. #2
    Addicted Member
    Join Date
    Aug 2002
    Location
    Luton, UK
    Posts
    178
    If you type GetData in a macro module and press the F1 key you will get help for this.
    Regards
    BrianB
    -------------------------------

  3. #3

    Thread Starter
    New Member
    Join Date
    May 2004
    Posts
    2
    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?

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width