+ Reply to Thread
Results 1 to 5 of 5

Error 1004 on Macro to refresh pivot tables

  1. #1
    Forum Contributor
    Join Date
    12-02-2009
    Location
    Birmingham, UK
    MS-Off Ver
    2007
    Posts
    185

    Error 1004 on Macro to refresh pivot tables

    Hello,

    I have occurred a problem with my macros.

    I have a document that contains 5 worksheets.

    Worksheet1 is a data, which is used for three different pivot tables each located in different worksheet.

    Worksheet 1 – Daily movements
    Worksheet 2 – Balance by Part (StockByPart - Pivot table)
    Worksheet 3 – Balance by SubCons (StockBySubCon – pivot table)
    Worksheet 4 – Outstanding and Arrears (Balance – pivot table)
    Worksheet 5 – Sheet3

    This is my latest amendment to the first macro:

    Please Login or Register  to view this content.
    Previous to that I had:
    Please Login or Register  to view this content.
    But my first macro was:


    Please Login or Register  to view this content.
    I do not understand why from the very beginning I cannot overcome the “Run-time error 1004. Unable to get the Pivot Tables property of the Worksheet class”

    If need be I will upload the workbook to have a look unless someone ca spot the mistake I have made in the first place.

    Thanks for reading this.

    Simon
    Last edited by Ramzes; 10-12-2010 at 06:54 AM.
    ...and this is when I walk in, dressed fully in white...

  2. #2
    Forum Expert
    Join Date
    01-15-2007
    Location
    Brisbane, Australia
    MS-Off Ver
    2007
    Posts
    6,591

    Re: Error 1004 on Macro to refresh pivot tables

    Hi

    Ran OK for me. Maybe you should attach the workbook.

    rylo

  3. #3
    Forum Contributor
    Join Date
    12-02-2009
    Location
    Birmingham, UK
    MS-Off Ver
    2007
    Posts
    185

    Re: Error 1004 on Macro to refresh pivot tables

    I just cannot make it work.

    I am attaching two files. One with pivot tables in separate sheets and the other with all tables on one spreadsheet. All on one spreadsheet has become error9 now.

    I don't know what else I can do to make it run.

    If anyone could test it and see if it works for him it would be great. At least to know if in general it works and it is something with my pc or I made it all wrong.

    Thanks for reading it and giving it a go.

    Simon
    Attached Files Attached Files

  4. #4
    Forum Expert
    Join Date
    01-15-2007
    Location
    Brisbane, Australia
    MS-Off Ver
    2007
    Posts
    6,591

    Re: Error 1004 on Macro to refresh pivot tables

    Simon

    I only looked at the second zip file and noted.

    1) StockByPart should be StocksByPart
    2) There seems to be something "funny" with the double apostrophes you have used. When I open them, they almost had a italics appearance. When I checked, they had ascii code 147. However, when I changed them to "normal" ones, ie with code 34, things ran OK.

    HTH

    rylo

  5. #5
    Forum Contributor
    Join Date
    12-02-2009
    Location
    Birmingham, UK
    MS-Off Ver
    2007
    Posts
    185

    Re: Error 1004 on Macro to refresh pivot tables

    Thank you rylo,

    you werer right in both cases. I do not understand how it happened the it changed that style of "" the apostrophes.

    works perfect now.

    Thank you.
    Simon

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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