在不影响Excel VBA中标记透明度的情况下更改系列的线透明度 [英] Changing line transparency of a series without affecting marker transparency in Excel VBA

查看:83
本文介绍了在不影响Excel VBA中标记透明度的情况下更改系列的线透明度的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在VBA中为excel编写一个宏,在该宏中,我想更改连接系列中标记的线条的透明度,但保持系列中标记的透明度不变.

I am writing a macro in VBA for excel in which I would like to change the transparency of the lines connecting markers in a series but leave the transparency of the markers in the series the same.

要指定:图表是散点图.我希望系列的标记是不透明/零透明度,系列中的线是75%透明.

To specify: the chart is a scatter plot. I would like the markers for a series to be opaque/zero transparency and for the lines in the series to be 75% transparent.

我通过使用以下命令调整了线条的透明度 myseries.format.line.transparency = 0.75 但这也会改变标记的透明度.

I have adjsuted the transparency of the lines by using myseries.format.line.transparency = 0.75 but this changes the marker transparency as well.

有人知道我可以分别更改两者的透明度的方法吗?我想象有一个成员/财产可以做我想做的事,但我找不到它.

does anyone know of a way I can change the transparency of the two separately? I imagine there is a member/property to do what I want, but I cannot find it.

在此先感谢您的帮助!

推荐答案

此答案不会使您感到非常开心.

This answer isn't going to make you very happy.

我之前已经研究过,我得到的信息是这根本不是您可以通过VBA指定的参数.看起来您可以访问标记样式,大小,背景颜色和前景色,仅此而已.

I've looked into this before and the information i've gotten is that this simply isn't a parameter that you can specify through VBA. It looks like you can access marker style, size, background color and foreground color, and that's about it.

也许MS认为没有人会喜欢这个.

Maybe MS didn't think anyone would ever want to mess with that.

您可以尝试的一种方法是应用自定义图表格式,但是如果您有可变的数字和/或系列顺序,则可能无法使用.

One thing you could try is applying a custom chart format, but if you have variable numbers and/or orders of series then that may not work.

 mychart.ApplyChartTemplate ("filepath\filename.crtx")

类似的事情,其中​​mychart已设置为等于您要设置格式的图表.

Something like that, where mychart is already set equal to the chart you want to format.

再次,也许对您没有任何用处,尽我所能想到.

Again, maybe not of any use to you, best i could think of.

这篇关于在不影响Excel VBA中标记透明度的情况下更改系列的线透明度的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆