+ Reply to Thread
Results 1 to 7 of 7

Recorded pivot macro run time error 5

  1. #1
    Registered User
    Join Date
    08-15-2012
    Location
    USA
    MS-Off Ver
    Office 365
    Posts
    73

    Recorded pivot macro run time error 5

    Hello,

    I recorded a pivot macro that only worked one time. Now when I try to run the macro, I get a run time error. Can anyone help? Sample sheet attached. Thanks
    Attached Files Attached Files

  2. #2
    Forum Contributor
    Join Date
    11-27-2009
    Location
    Austin, Texas
    MS-Off Ver
    Excel 2013 & 2016
    Posts
    409

    Re: Recorded pivot macro run time error 5

    Hi Cindywylie,

    I believe the reason you cannot run the macro a second time I suspect, is because sheet1 in your macro has already being used and assigned a pivot table1 as per your code.
    You can close the spreadsheet down and open again and re-run, it worked for me!!
    ==========
    Bigroo1958
    Austin, Texas
    ==========

  3. #3
    Registered User
    Join Date
    08-15-2012
    Location
    USA
    MS-Off Ver
    Office 365
    Posts
    73

    Re: Recorded pivot macro run time error 5

    Each month I create a new tab. Will I be able to use this macro on all future tabs?

  4. #4
    Registered User
    Join Date
    08-15-2012
    Location
    USA
    MS-Off Ver
    Office 365
    Posts
    73

    Re: Recorded pivot macro run time error 5

    Is there a way to modify a recorded pivot to be used on new worksheets in a workbook

  5. #5
    Forum Contributor
    Join Date
    11-27-2009
    Location
    Austin, Texas
    MS-Off Ver
    Excel 2013 & 2016
    Posts
    409

    Re: Recorded pivot macro run time error 5

    Hi Cindywylie,

    Sorry, I don't have the answer to your question, I am learning VBA myself, but my first response to your question was my first observation, I am hoping someone will come along with the correct answer to assist you!

  6. #6
    Registered User
    Join Date
    08-15-2012
    Location
    USA
    MS-Off Ver
    Office 365
    Posts
    73

    Re: Recorded pivot macro run time error 5

    Bigroo - Thanks for the try. I appreciate it just the same.

  7. #7
    Forum Contributor
    Join Date
    11-27-2009
    Location
    Austin, Texas
    MS-Off Ver
    Excel 2013 & 2016
    Posts
    409

    Re: Recorded pivot macro run time error 5

    Hi CindyWylie,

    I did find this spreadsheet with "Create Pivot" in the 4 modules. I ran this over and over again and appears to work fine with the sample data..
    Maybe you can modify the code for your needs??

    Thanks
    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. [SOLVED] URGENT.. Recorded Pivot Table Macro error
    By nawGo in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 04-15-2014, 11:14 AM
  2. [SOLVED] Recorded Pivot Table Macro Doesn't Do What I Recorded!
    By diakonos1984 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 03-26-2013, 11:01 AM
  3. [SOLVED] Error in a recorded macro to create Pivot Table
    By aadeshgandhi in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 08-21-2012, 12:40 PM
  4. Recorded macro for Pivot Table
    By jackman in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 05-12-2009, 05:16 PM
  5. Recorded Macro with Pivot table
    By Eladamri in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 03-31-2008, 09:04 PM

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