+ Reply to Thread
Results 1 to 10 of 10

Pivot Table Macro - Debug Error: Created in 2016 and works, does not work in Excel 2013

  1. #1
    Registered User
    Join Date
    08-06-2015
    Location
    Mesa, Arizona
    MS-Off Ver
    Microsoft Excel 2013
    Posts
    84

    Pivot Table Macro - Debug Error: Created in 2016 and works, does not work in Excel 2013

    Good Morning Friends,

    I created a Macro that works great on my PC using Excel 2016, but will not work on my co-workers PC since she only has Excel 2013. I realize that it is due to the Pivot table version, which I updated to "5" per the version list I found (it was previously 6). Unfortunately the debug error is still populating:

    "Run-time error '1004':
    Application-defined or object-defined error"


    Here is the pivot table portion of the macro as it is now, with the only change made to the version. I'm guessing I'm missing additional steps and would appreciate some guidance

    Formula: copy to clipboard
    Please Login or Register  to view this content.




    Thank you!!

  2. #2
    Forum Guru xlnitwit's Avatar
    Join Date
    06-27-2016
    Location
    London
    MS-Off Ver
    Windows: 2010; Mac: 16.13 (O365)
    Posts
    7,085

    Re: Pivot Table Macro - Debug Error: Created in 2016 and works, does not work in Excel 201

    Hi,

    On which line does the error happen?
    Don
    Please remember to mark your thread 'Solved' when appropriate.

  3. #3
    Registered User
    Join Date
    08-06-2015
    Location
    Mesa, Arizona
    MS-Off Ver
    Microsoft Excel 2013
    Posts
    84

    Re: Pivot Table Macro - Debug Error: Created in 2016 and works, does not work in Excel 201

    Hi There,

    The error highlights this portion:

    Formula: copy to clipboard
    Please Login or Register  to view this content.

  4. #4
    Forum Guru xlnitwit's Avatar
    Join Date
    06-27-2016
    Location
    London
    MS-Off Ver
    Windows: 2010; Mac: 16.13 (O365)
    Posts
    7,085

    Re: Pivot Table Macro - Debug Error: Created in 2016 and works, does not work in Excel 201

    What is the value of Last_row when the error happens?

  5. #5
    Registered User
    Join Date
    08-06-2015
    Location
    Mesa, Arizona
    MS-Off Ver
    Microsoft Excel 2013
    Posts
    84

    Re: Pivot Table Macro - Debug Error: Created in 2016 and works, does not work in Excel 201

    The last row is set like this:

    Formula: copy to clipboard
    Please Login or Register  to view this content.


    And the value in the last row of A is 984, formatted as general. The macro works perfectly in Excel 2016 -- the issue is in 2013.

  6. #6
    Forum Guru xlnitwit's Avatar
    Join Date
    06-27-2016
    Location
    London
    MS-Off Ver
    Windows: 2010; Mac: 16.13 (O365)
    Posts
    7,085

    Re: Pivot Table Macro - Debug Error: Created in 2016 and works, does not work in Excel 201

    I mean what is the actual value of the Last_row variable- as verified in the Locals window- when the code errors?

  7. #7
    Registered User
    Join Date
    08-06-2015
    Location
    Mesa, Arizona
    MS-Off Ver
    Microsoft Excel 2013
    Posts
    84

    Re: Pivot Table Macro - Debug Error: Created in 2016 and works, does not work in Excel 201

    I'm so sorry, here is a screen shot: Locals Window.PNG

  8. #8
    Forum Guru xlnitwit's Avatar
    Join Date
    06-27-2016
    Location
    London
    MS-Off Ver
    Windows: 2010; Mac: 16.13 (O365)
    Posts
    7,085

    Re: Pivot Table Macro - Debug Error: Created in 2016 and works, does not work in Excel 201

    To try and help narrow the problem down, please try this version instead of that line
    Please Login or Register  to view this content.
    and see which part causes the error.

  9. #9
    Forum Expert
    Join Date
    08-12-2012
    Location
    Sydney, Australia
    MS-Off Ver
    Excel 2010
    Posts
    5,636

    Re: Pivot Table Macro - Debug Error: Created in 2016 and works, does not work in Excel 201

    Please Login or Register  to view this content.
    Take version out
    If you are satisfied with the solution(s) provided, please mark your thread as Solved.
    Select Thread Tools-> Mark thread as Solved. To undo, select Thread Tools-> Mark thread as Unsolved.

  10. #10
    Forum Expert
    Join Date
    08-12-2012
    Location
    Sydney, Australia
    MS-Off Ver
    Excel 2010
    Posts
    5,636

    Re: Pivot Table Macro - Debug Error: Created in 2016 and works, does not work in Excel 201

    if you still require version in there go with the lowest that someone is going to use
    http://www.globaliconnect.com/excel/...emid=475#Pivot Table versions & Excel version
    xlPivotTableVersion2000, 0, Excel 2000, 9.0
    xlPivotTableVersion10, 1, Excel 2002, 10.0
    xlPivotTableVersion11, 2, Excel 2003, 11.0
    xlPivotTableVersion12, 3, Excel 2007, 12.0
    xlPivotTableVersion14, 4, Excel 2010, 14.0

+ 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. Macro that works in Excel 2010 does not work in Excel 2013
    By karenmwhaley in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 02-12-2016, 08:12 PM
  2. Replies: 0
    Last Post: 01-09-2016, 02:02 PM
  3. Excel to Word macro doesn't work on Word 2013 if sheet is hidden (works fine on 2010)
    By dreddster in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 06-29-2015, 04:37 AM
  4. Replies: 1
    Last Post: 04-17-2015, 09:06 AM
  5. Works in Excel 2007, does not work in 2013
    By froggy50 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 03-06-2014, 06:42 AM
  6. Recording Macro to create a Pivot Table in Excel 2013: run time error 5 invalid procedure
    By developerstew in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 10-25-2013, 07:17 AM
  7. Replies: 0
    Last Post: 02-01-2010, 09:45 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