在Excel中使用VBA设置图像透明度 [英] Set image transparency with VBA in Excel
本文介绍了在Excel中使用VBA设置图像透明度的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
有没有办法使用VBA脚本对图像应用一些透明度?我录制了一个宏,似乎没有记录艺术效果。我已经找到了如何使它的形状,但不是图像。
Is there a way to apply some transparency to an image using a VBA script? I have recorded a "macro" and it seems that artistic effects aren't recorded. I have found how to make it for shapes, but not for images.
推荐答案
这需要几个步骤:
- 在工作表上放置AutoShape(如矩形)
- 使用以下方式将实际图片嵌入矩形:
.ShapeRange.Fill.UserPicture
- 使用以下方式调整透明度:
.ShapeRange.Fill.Transparency
- Place an AutoShape (like a rectangle) on the worksheet
- Embed your actual picture in the rectangle using:
.ShapeRange.Fill.UserPicture
- Adjust the transparency using:
.ShapeRange.Fill.Transparency
这篇关于在Excel中使用VBA设置图像透明度的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文