[英]Make a cell color itself based on RGB value in three cells
我不知道为什么这段代码行不通。
Function colorme(Red As Integer, Green As Integer, Blue As Integer)
Application.Caller.Interior.color = RGB(Red, Green, Blue)
End Function
我想使其在电子表格中起作用,例如:
__red__|_green_|_blue__|_color_|_
____50_|_____0_|____60_|#purple|_
但是#purple实际上是使用colorme(A2,B2,C2)紫色的。
用户定义的函数不能更改单元格的任何属性,但包含公式的单元格的值除外。 您可以编写一个子例程来更改单元格的颜色,但是除非我弄错了,否则您尝试的方法是不可能的。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.