+ Reply to Thread
Results 1 to 2 of 2

Pivot table - problem with sourcedata

  1. #1
    Registered User
    Join Date
    02-08-2016
    Location
    Holland
    MS-Off Ver
    2010
    Posts
    21

    Question Pivot table - problem with sourcedata

    Hi all,

    I am new to macro's and this is my first one. I have trouble to get my pivot table to work in different sheets. In the syntax there is a hardcoded sourcedata which I think creates the error. Instead of this fixed name, it should be the name of the worksheet in which I want to execute the macro.

    Anyone a line of advice? Underneath is the syntax, the line which I think is the troublemaker is in bold.

    thx in advance.

    Please Login or Register  to view this content.
    Last edited by Leith Ross; 03-18-2016 at 05:33 PM. Reason: Added Code Tags

  2. #2
    Registered User
    Join Date
    11-19-2012
    Location
    Dublin, Ireland
    MS-Off Ver
    2016
    Posts
    57

    Re: Pivot table - problem with sourcedata

    Hi,

    I think you're right, the hardcoded sheet name might be the problem.

    Try adding:
    Please Login or Register  to view this content.
    above the line which creates your PivotTable, and then, change it from:
    Please Login or Register  to view this content.
    to
    Please Login or Register  to view this content.
    and see if it works?

+ 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. Pivot table problem - how to relate 3 sheets' data into 1 pivot table?
    By GRG Stevan in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 09-14-2015, 06:12 AM
  2. Can I use variables in the Sourcedata from a Dynamic Table??
    By sergiomimo in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 06-25-2013, 07:07 PM
  3. VBA Pivot Table: Problem with pivot item visibility
    By rotown21 in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 05-22-2013, 03:56 AM
  4. How to update the sourcedata in existing pivot
    By ravids in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 08-14-2012, 10:28 AM
  5. Dynamic Pivot Table changing the SourceData
    By reclmaples in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 06-22-2009, 10:45 AM
  6. [SOLVED] Modify Pivot Table SourceData range
    By Mike Fogleman in forum Excel Programming / VBA / Macros
    Replies: 11
    Last Post: 05-12-2006, 01:02 PM
  7. [SOLVED] Pivot Table sourcedata string truncation
    By John B in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 01-27-2006, 01:55 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