+ Reply to Thread
Results 1 to 2 of 2

VBA: Pivotchart is created whereas i don't want data from pivot table

  1. #1
    Registered User
    Join Date
    09-08-2022
    Location
    Hamburg, Germany
    MS-Off Ver
    Windows10
    Posts
    1

    VBA: Pivotchart is created whereas i don't want data from pivot table

    Hello all,

    I will try to explain clearly my problem here.
    I have a sheet where there is a pivot table and in an other place of that same sheet there is a table with data for each calendar week.
    From this table with data for each calendar week I want to generate a chart.

    In the code here under, I first create a chart object and then I want to set the range of my table with data for each calendar week and NOT data from pivot table.

    I realized that a pivot chart (with pivot table data) is created instead of a standard chart. I don't get it how I can avoid it
    Moreover I have an error and can't get rid of it.

    Set oChartObj = ActiveSheet.ChartObjects.Add(Top:=20, Left:=500, Width:=650, Height:=320)

    Set rng = Range(Range(Worksheets("Config").Cells(j, ConfTLTableKW)), Cells(lRowT, lColumnT))
    oChartObj.Chart.SetSourceData Source:=rng <-------------------------------------------------------ERROR automation error - unspecified error.

    Any help will be appreciate.
    Thanks for your support!

  2. #2
    Forum Guru
    Join Date
    08-28-2014
    Location
    USA
    MS-Off Ver
    Excel 2019
    Posts
    17,570

    Re: VBA: Pivotchart is created whereas i don't want data from pivot table

    Hello Damien2407 and Welcome to Excel Forum.
    Not to say that I can help solve, however it may be easier for someone to help if we could see a sample file.
    Information on attaching a file to your next post is given in the "HOW TO ATTACH YOUR SAMPLE WORKBOOK" banner at the top of the page.
    Let us know if you have any questions.
    Consider taking the time to add to the reputation of everybody that has taken the time to respond to your query.

+ 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. Removing a field in a pivotchart, but not in the pivot table
    By herrmannb34 in forum Excel Charting & Pivots
    Replies: 1
    Last Post: 07-06-2016, 09:03 AM
  2. Replies: 2
    Last Post: 09-03-2014, 10:51 AM
  3. Replies: 0
    Last Post: 02-20-2014, 11:49 AM
  4. Replies: 2
    Last Post: 03-26-2013, 08:06 AM
  5. Replies: 2
    Last Post: 09-14-2012, 10:10 AM
  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. pivotchart pivot table
    By lennert in forum Excel General
    Replies: 1
    Last Post: 02-14-2006, 09:50 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