Excel 图表与数据透视表的动态创建与应用
1. 动态放置图表
1.1 创建 PlaceChartDynamic 子程序
在 VBE 中,于 Standard Module1 里创建一个名为 PlaceChartDynamic 的新子程序。将 PlaceChart 过程的代码复制并粘贴到 PlaceChartDynamic 中。
1.2 存储图表位置信息到数组
- 创建
GetChartInfo函数 :在Standard Module1上创建一个名为GetChartInfo()的新函数。
Private Function GetChartInfo(MyChart As ChartObject) As Variant
Dim varReturn As Variant
Dim arrChartInfo(3) As Variant
With MyChart
arrChartInfo(0) = .Name
arrChartInfo(1) = .Top
arrChartInfo(2) = .Left
arrChartInfo(3) = .Height
End With
varR
超级会员免费看
订阅专栏 解锁全文
2026

被折叠的 条评论
为什么被折叠?



