Hello,
I am using VBA to change the source data of a pivot cache which has several pivot tables connected to it. When the program runs, it connects the "main" pivot table to the new source data and then matches the remaining pivot tables to the "main" pivot table's index. Each pivot table has one pivot chart connected to it as well. When I attempt to change the source data, the chart legends will not change colors. In fact, most of the time, each entry in the legend is assigned the same color. For example, each stack of a stacked column chart and every line of a line chart has the same color. If I copy the file and the data into a new workbook with the same code and layout, the VBA program runs fine for about the first three times that I open the file and change the pivot cache of the pivot tables. However, after that, this problem occurs. When I check chart design and then look at the selected chart color, the correct color schema is selected but does not display in the chart. If I manually select the color schema I want after the error occurs, the chart colors only correctly display for the first member in the legend. Does anyone know why or at least have a solution? Any help would be greatly appreciated.
I am using VBA to change the source data of a pivot cache which has several pivot tables connected to it. When the program runs, it connects the "main" pivot table to the new source data and then matches the remaining pivot tables to the "main" pivot table's index. Each pivot table has one pivot chart connected to it as well. When I attempt to change the source data, the chart legends will not change colors. In fact, most of the time, each entry in the legend is assigned the same color. For example, each stack of a stacked column chart and every line of a line chart has the same color. If I copy the file and the data into a new workbook with the same code and layout, the VBA program runs fine for about the first three times that I open the file and change the pivot cache of the pivot tables. However, after that, this problem occurs. When I check chart design and then look at the selected chart color, the correct color schema is selected but does not display in the chart. If I manually select the color schema I want after the error occurs, the chart colors only correctly display for the first member in the legend. Does anyone know why or at least have a solution? Any help would be greatly appreciated.