VBA-如何确定显示的传奇条目数量
我全心全意地寻找答案,我完全被困了。任何帮助将不胜感激!
如您所见,.chart
中有20个。 >。 我想使用vba调整
.legend
大小和/或减少.legend
字体大小,直到所有20 .series
显示在.legend
。
但是我不知道如何确定.legendentries
在.legend
中显示的。
.legend.legendentries.count
因此,我给了我“ 20”。
我很茫然。
I've looked all over for the answer to this and I am completely stumped. Any help would be greatly appreciated!
As you can see, there are 20 .Series
in the .Chart
, but only 15 are visible in the .Legend
.
I want to use VBA to adjust the .Legend
size and/or reduce the .Legend
font size until all 20 .Series
are shown in the .Legend
.
But I have no idea how to determine the number of .LegendEntries
shown in the .Legend
.
.Legend.LegendEntries.Count
gives me "20" as a result.
I'm at a loss.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
在您的示例中使用此代码(结果可能会有所不同),您可以确定哪些传奇条目不可见。它计算传奇窗口和传奇条目的顶部之间的差异。负数应表明它不可见
Using this code on your example (your results may vary) you can identify which legend entries are not visible. It calculates the difference between the legend's window and the legend entry's top. A negative should indicate it is not visible