+ Reply to Thread
Results 1 to 5 of 5

Pivot Table, recoded code vs mine, neither works!

  1. #1
    Registered User
    Join Date
    06-04-2013
    Location
    Toronto
    MS-Off Ver
    Excel 2003
    Posts
    36

    Unhappy Pivot Table, recoded code vs mine, neither works!

    errors:
    5 - invalid procedure call

    1004 - Uanble to get the pivotTables property of the worksheet class

    i've recorded the following Macro, however using it as Auto_Open give me error 1004.

    I tried playing with the code and I am stuck, I cannot get it to work. If anyone could please provide some feedback. I am new to VB.

    My code clears a couple sheets on open(delete the old pivot/temp info), then copies a web query to a temporary sheet then I insert my "categories" above the query that I need in my pivot table, then I pivot, move the categories to column,row,count. copy the grand total cells to the adjacent cells to be referenced by another workbook. Why is the recorded macro not working? how can i modify the code to get it working?

    Thanks!!!
    Please Login or Register  to view this content.

  2. #2
    Valued Forum Contributor
    Join Date
    09-21-2011
    Location
    Birmingham UK
    MS-Off Ver
    Excel 2003/7/10
    Posts
    2,188

    Re: Pivot Table, recoded code vs mine, neither works!

    where does it error? can you attach?
    Hope this helps

    Sometimes its best to start at the beginning and learn VBA & Excel.

    Please dont ask me to do your work for you, I learnt from Reading books, Recording, F1 and Google and like having all of this knowledge in my head for the next time i wish to do it, or wish to tweak it.
    Available for remote consultancy work PM me

  3. #3
    Registered User
    Join Date
    06-04-2013
    Location
    Toronto
    MS-Off Ver
    Excel 2003
    Posts
    36

    Re: Pivot Table, recoded code vs mine, neither works!

    Please Login or Register  to view this content.

  4. #4
    Registered User
    Join Date
    06-04-2013
    Location
    Toronto
    MS-Off Ver
    Excel 2003
    Posts
    36

    Re: Pivot Table, recoded code vs mine, neither works!

    Instead of creating a new pivot table, i am simply refreshing my web query and then refreshing the pivot table. Thanks for the help.

  5. #5
    Valued Forum Contributor
    Join Date
    03-22-2013
    Location
    Australia,NSW, Wirrimbi
    MS-Off Ver
    Excel 2013
    Posts
    1,057

    Re: Pivot Table, recoded code vs mine, neither works!

    Hi..

    Perhaps just remove the semi colon from your PivotFields section... I am assuming that your column/row doesn't include a semi colon in it?

    Example..

    Please Login or Register  to view this content.
    Last edited by apo; 06-04-2013 at 10:11 AM.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Tags for this Thread

Bookmarks

Posting Permissions

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

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1