If it throws errors you may have to debug a few times. Paste the VBA code into the sheet, save and close the editor. To add this to the worksheet, Right click on the worksheet tab and click view code. Adding the line "On Error Resume Next" means that if it threw an error the code would move on and continue. My code was throwing errors when it tried to format the "limit" timeseries. The first line in the code executes the code block each time the sheet recalculates. Private Sub Worksheet_Calculate()ĪctiveSheet.ChartObjects("Chart 3").ActivateĪctiveChart.FullSeriesCollection(1).ChartType = xlColumnStackedĪctiveChart.FullSeriesCollection("Limit").ChartType = xlLine My solution was to add some VBA code to the worksheet. I had a combo graph and the series style kept altering from line to stacked bar. I had a similar problem with the pivot chart series formatting changing when i added a filter or useda slicer.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |