I have a set of Pivot tables / charts automatically created with VBA code with custom formatting.
When I change the selection of data to appear from the drop down list in the chart, the custom formatting is returned to the default type of chart type. The underlying chart data does not change, what is shown on the chart only What should I do to maintain custom feeds every time, when I change the pivot item selection in a row field? Editing 1: The underlying data will not change for the pivot table However, every time I change a filter on a row, column, or page field, the updated axis chart loses the original format defined by the VBA code. is.
Edit 2: This is only associated with older versions from Excel 2007.
How does it feel to me that the VBA code creates pivot tables / charts and then you later Unfortunately, with VBA, when you update pivot tables / charts, all your custom formatting is lost; Excel is basically also making a new one every time
If you have hand-formatted in Excel then I think Excel keeps track of it and your voice As Gage maintains that the data change. For example I can think that if you accidentally remove a sheet, you undo it, although if you remove a sheet in VBA, then there is no possible way to return.
I will use it as a solution.
Create two processes: one that creates a PivotTable from scratch when given to the data, and the second formatting a pivot table in view of the pivot table limit. Code can see something like
generate subpottable (Range as Range, as a variant in the form of variant, var2 as the variant) code here that creates your pivot table. The code 'Sub-sub format' PTTTable (Range as Range, as a variant in the form of variables, and the code here) to format the range and other information given by POT table, which is to be done. RNG in the form of the Rient) "You can even pass directly a pituitary object: D and all
Then you will have to do all this work as if your current code is one Make the cover function which only makes both calls.
Generate sub and format PivotTable (rng, rng, color generated, PivotTable (RNG, Veer1, Veer2) 'maybe some calls to make next call call formatPivotTable (RNG, Veer 1, Veer 2) End to set
If you want to pass PivotTable as an object then you can clear something like ....
Generate PivotTable (PivotTable as 'PivotTable' as 'PivotTable' function generates its own axis and generate it PivotTable = myPivotTableThatIMade End Function Sub FormatPivotTable ('PivotTable as a PivotTableThatYouMake') code which is different as PivotTable End Sub Sub GenerateAndFormatPivotTable (RNG, var1 as var1, var2, PivotTable (GeneratePivotTable ( Variable as variant) End allYou do all this if you create a table, then it has to zoom more, so you can format the updated table You can use that format for that.
For extra insanity, that sheet is a PivotTable fire, it is a worksheet. Change or Worksheet To search for PivotTable, activate the event and call your formatting function: D
Comments
Post a Comment