+ Reply to Thread
Results 1 to 9 of 9

Pivot table source not working run time error 1004

  1. #1
    Registered User
    Join Date
    04-15-2014
    Location
    Danville,NH
    MS-Off Ver
    Excel 2003
    Posts
    7

    Pivot table source not working run time error 1004

    Hello,
    This is my first post to this forum. I am trying to create vba code so my pivot table source gets updated dynamically with no luck. I am getting a run time error 1004 Method (Range of Object) _ global failed. I am using excel 2003.
    I have two sheets in this spreadsheet. The first sheet is called Summary. This sheet has the pivot table in it. The second sheet is called DATA. This sheet has all the data in it. The data sheet has 5 columns of data in it.
    My error occurs at rDataRange

    Any help is appreciated.

    Please Login or Register  to view this content.

  2. #2
    Administrator 6StringJazzer's Avatar
    Join Date
    01-27-2010
    Location
    Tysons Corner, VA, USA
    MS-Off Ver
    MS365 Family 64-bit
    Posts
    24,721

    Re: Pivot table source not working run time error 1004

    There is not enough information here to thoroughly diagnose but one thing pops out at me. From context, I think you want to Set rDataRange, not merely assign a value to it. That is probably what is causing the error.

    Please Login or Register  to view this content.
    You also should be looking at the value of oBotRow at the point where it fails to make sure it's a valid value.

    Moderator's note: Moved from Pivot Tables; it's related to pivot tables but the real problem is a VBA problem.
    Jeff
    | | |會 |會 |會 |會 | |:| | |會 |會
    Read the rules
    Use code tags to [code]enclose your code![/code]

  3. #3
    Registered User
    Join Date
    04-15-2014
    Location
    Danville,NH
    MS-Off Ver
    Excel 2003
    Posts
    7

    Re: Pivot table source not working run time error 1004

    I checked and iBotRow is a valid value of 2931.

  4. #4
    Registered User
    Join Date
    04-15-2014
    Location
    Danville,NH
    MS-Off Ver
    Excel 2003
    Posts
    7

    Re: Pivot table source not working run time error 1004

    I tried the code change and I got the same error 1004. When I look at rDataRange I get a nothing response.

  5. #5
    Registered User
    Join Date
    04-15-2014
    Location
    Danville,NH
    MS-Off Ver
    Excel 2003
    Posts
    7

    Re: Pivot table source not working run time error 1004

    What kind of information do you need?

  6. #6
    Administrator 6StringJazzer's Avatar
    Join Date
    01-27-2010
    Location
    Tysons Corner, VA, USA
    MS-Off Ver
    MS365 Family 64-bit
    Posts
    24,721

    Re: Pivot table source not working run time error 1004

    Your entire workbook.

    Another thing that might work is

    Please Login or Register  to view this content.
    Having your workbook will allow me (us) to mess with the code and possibly return a finished product, rather than going back and forth in several posts with snippets of code.

  7. #7
    Registered User
    Join Date
    04-15-2014
    Location
    Danville,NH
    MS-Off Ver
    Excel 2003
    Posts
    7

    Re: Pivot table source not working run time error 1004

    OK I will attache the database and template.

  8. #8
    Registered User
    Join Date
    04-15-2014
    Location
    Danville,NH
    MS-Off Ver
    Excel 2003
    Posts
    7

    Re: Pivot table source not working run time error 1004

    I have tried to attach both files. When I try to upload my database I get an error message saying my file is invalid.
    Attached Files Attached Files

  9. #9
    Registered User
    Join Date
    04-15-2014
    Location
    Danville,NH
    MS-Off Ver
    Excel 2003
    Posts
    7

    Re: Pivot table source not working run time error 1004

    OK I guess I had to zip the database
    Attached Files Attached Files

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Run time error 1004. Pivot Table Refresh
    By mlegge77 in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 08-02-2013, 11:26 AM
  2. Run time error '1004' when populating pivot table
    By Orongo in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 10-22-2012, 07:29 AM
  3. Run-time error 1004 in Pivot Table
    By NMullis in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 02-28-2008, 06:30 PM
  4. Run Time Error 1004, Pivot table
    By keshav in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 03-02-2007, 10:01 AM
  5. [SOLVED] Pivot Table Run Time Error 1004
    By Dale in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 05-03-2006, 11:50 AM

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