+ Reply to Thread
Results 1 to 2 of 2

pivot table refresh - error 1004 - reference is not valid

  1. #1
    Registered User
    Join Date
    11-11-2008
    Location
    Syracuse NY
    MS-Off Ver
    2007
    Posts
    90

    pivot table refresh - error 1004 - reference is not valid

    I have a macro that refreshes 4 pivot tables that refer to data on another sheet in the same workbook. I want the sheet containing the pivot tables to be protected but still have the pivot tables be able to update. It works fine on my copy of Excel 2007, but other people running Excel 2003 can't get it to work. They get error 1004 - "reference is not valid".

    Please Login or Register  to view this content.
    The debugger highlights this:

    Please Login or Register  to view this content.
    This is stumping me. Anybody know what's going on?

  2. #2
    Registered User
    Join Date
    11-11-2008
    Location
    Syracuse NY
    MS-Off Ver
    2007
    Posts
    90
    I figured it out. The reference that caused error 1004 in Excel 2003 was the reference to the table that the pivot tables used as a data source. I changed the data source of the pivot tables to a dynamic named range as explained here: http://www.ozgrid.com/Excel/advanced-dynamic-ranges.htm

    This grabs the first 18 columns of the sheet, no matter how long they are:

    Please Login or Register  to view this content.

+ 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