gpt4 book ai didi

Applying Template to Dynamic Chart Excel VBA(模板在动态图表Excel VBA中的应用)

转载 作者:bug小助手 更新时间:2023-10-28 13:34:47 26 4
gpt4 key购买 nike



I have created a dashboard. Sometimes the dynamic charts lose their format (when the slicer selections gets no data)

我已经创建了一个仪表板。有时,动态图表会丢失其格式(当切片器选择没有数据时)


Once "good" data is selected, regular charts return to proper template, but dynamic charts are all messed up.

一旦选择了“好”数据,常规图表返回到正确的模板,但动态图表都乱了。


I wanna create a macro to reset the charts templates by applying saved templates. The macro isn't running.

我想创建一个宏,通过应用保存的模板来重置图表模板。宏没有运行。


ActiveSheet.ChartObjects("IncrementoMínimo").Activate

ActiveChart.ApplyChartTemplate ("C:\Users\danie\OlaKase\\Plantillas Gráficos\Incremento Mínimo.crtx")

error displayed


I don't know why, it is working in another file.

我不知道为什么,它在另一个文件中工作。


ActiveSheet.ChartObjects("Gráfico 8").Activate

ActiveChart.ApplyChartTemplate ("C:\Users\danie\AppData\\Gráfico2.crtx")

The file where it's working ok:
The dynamic chart is from a single table.
All the data labels come from a dynamic table.

工作正常的文件:动态图表来自单个表。所有数据标签都来自一个动态表。


The file where it's not working:
The dynamic charts are from Power Pivot Tables, is combining 4 tables.
Some of the data labels are from cells.

它不起作用的文件:动态图表来自Power Pivot表,组合了4个表。有些数据标签来自单元格。


ideal design


messed up design


更多回答
优秀答案推荐

I suspect unchecking the Properties Follow Chart Data Point setting in the Advanced Options (the link is to a tutorial I've written about this).

我怀疑取消选中高级选项中的属性跟随图表数据点设置(链接指向我写过的关于这方面的教程)。


Click on Excel’s File tab on the ribbon, choose Options, then click on Advanced. Scroll down to Chart, and you’ll see “Properties Follow Chart Data Point for All New Workbooks” and “Properties Follow Chart Data Point for Current Workbook”.

单击功能区上的Excel文件选项卡,选择选项,然后单击高级。向下滚动到Chart,您将看到“所有新工作簿的属性跟随图表数据点”和“当前工作簿的属性跟随图表数据点”。


Uncheck the box for the current workbook, and see if the problems with dynamic data remains.

取消选中当前工作簿的框,并查看动态数据问题是否仍然存在。



Already solved: i had "protected sheet" LMAO. Just removed protection with vba. Thanks to everyone.

已经解决了:我有“保护表”LMAO。刚刚取消了对VBA的保护。感谢每一个人。


更多回答

Thx. Doesn't work, but thanks.

谢谢。不管用,不过还是谢谢你。

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com