+ Reply to Thread
Results 1 to 1 of 1

Use Variables in makro for PivotFields, PivotTables or Array

  1. #1
    Registered User
    Join Date
    09-27-2023
    Location
    Neunheim
    MS-Off Ver
    2013
    Posts
    1

    Use Variables in makro for PivotFields, PivotTables or Array

    Hello to all,

    i want to set up a vba macro which will copy the pivot filters from one pivot table to other pivot tables in the same excel file.

    First i do thjs with full coding of the elements like sheet, pivot table, pivot fields and array.

    Code like this, i made for every pivot table and for every pivot filter.

    In second step no i will write one code for all pivot tables and pivot fields where the values
    for pivot tables and pivot fields will come from variables.

    examble see attached picture, -> green marked is the code that works,
    -> red marked is the code that fails.

    But this fails with following error text. "The item could not be found in the OLAP-Cube".

    What do i wrong ?

    Can anyone give me a solution ?

    regards
    Manfred


    Here comes the example code (note the code is reduced)

    Please Login or Register  to view this content.
    Attached Images Attached Images
    Last edited by mpfl; 10-04-2023 at 03:17 AM.

+ 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. Replies: 1
    Last Post: 04-27-2021, 11:35 AM
  2. Replies: 1
    Last Post: 07-19-2019, 11:49 AM
  3. [SOLVED] How to equate array variables to other array variables in a formula
    By Geode7 in forum Excel Programming / VBA / Macros
    Replies: 9
    Last Post: 05-13-2019, 04:45 AM
  4. VBA to assign Variables to PivotFields
    By kvarner in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 01-27-2016, 02:51 PM
  5. Macro to Automate Selection of PivotFields
    By aditya88 in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 01-31-2014, 04:43 PM
  6. Pivot Table Macro PivotFields
    By fengfeng in forum Excel General
    Replies: 0
    Last Post: 09-09-2009, 09:43 AM
  7. Making only selected PivotFields visible via macro
    By Phil Spears in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 01-20-2006, 09: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