+ Reply to Thread
Results 1 to 2 of 2

Pivot Table not being created by VBA Code

  1. #1
    Registered User
    Join Date
    02-21-2020
    Location
    Davis, CA
    MS-Off Ver
    Office 365 Professional 2019
    Posts
    1

    Pivot Table not being created by VBA Code

    I have been struggling to create a pivot table using the following piece of VBA code, but I cannot find the error. I assigned a watch window to PT2, and I noticed after I set PT2 equal to the PivotCache, PTCache2, PT2 still appears with a value of nothing. The With Block does not work because VBA thinks PT2 is an empty object. I am pulling data from a table, GroupDetects, on another sheet, Detects. I am using Excel 2016.

    Please Login or Register  to view this content.
    PT2 Watch Window.png
    Attached Files Attached Files
    Last edited by paydog23; 03-20-2020 at 08:01 PM.

  2. #2
    Forum Moderator alansidman's Avatar
    Join Date
    02-02-2010
    Location
    Steamboat Springs, CO
    MS-Off Ver
    MS Office 365 Version 2403 Win 11 Home 64 Bit
    Posts
    23,803

    Re: Pivot Table not being created by VBA Code

    crossposted: https://www.mrexcel.com/board/thread...-code.1128180/

    Rule 03: Cross-posting Without Telling Us

    Your post does not comply with Rule 3 of our Forum RULES. Do not cross-post your question on multiple forums without telling us about your threads on other forums.

    Post a link to any other forums where you have asked the same question.

    Cross-posting is when you post the same question in other forums on the web. The last thing you want to do is waste people's time working on an issue you have already resolved elsewhere. We prefer that you not cross-post at all, but if you do (and it's unlikely to go unnoticed), you MUST provide a link (copy the url from the address bar in your browser) to the cross-post.

    Read this to understand why we ask you to do this.

    I have added the crosspost reference for you today. Please comply with this and all our rules in the future
    Alan עַם יִשְׂרָאֵל חַי


    Change an Ugly Report with Power Query
    Database Normalization
    Complete Guide to Power Query
    Man's Mind Stretched to New Dimensions Never Returns to Its Original Form

+ 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] Pivot table not created due to sheet reference
    By amartin575 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 02-25-2020, 12:56 PM
  2. [SOLVED] Changing Pivot Table Source- Code Created Files Require Manual Refresh Each Time Opened
    By Aquamore in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 05-08-2015, 05:53 PM
  3. Replies: 2
    Last Post: 09-03-2014, 10:51 AM
  4. VBA - Created Pivot Table - Filters Incorrectly
    By jhuang5132 in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 08-13-2014, 05:02 PM
  5. Replies: 1
    Last Post: 06-05-2012, 04:52 PM
  6. VBA Created Pivot Table Doesn't Show Data
    By yawnzzzz in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 10-08-2008, 10:20 AM
  7. How to view VB Code behind Pivot Table created via Wizard
    By Firemark1817 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 02-20-2005, 12:06 PM

Tags for this Thread

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