VBA-使用已经在Excel中选择的颜色填充单元格内部 [英] VBA - use color already select in Excel to fill cell interior

查看:196
本文介绍了VBA-使用已经在Excel中选择的颜色填充单元格内部的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我知道如何将单元的内部颜色设置为某种颜色,但是有一种方法可以使它(即单元颜色)默认为在色带的颜色窗口中已经选择的颜色?

I know how to set the interior color of a cell to a certain color, but is there a way to do it so that it (i.e., the cell color) defaults to the color already selected in the color window of the ribbon?

推荐答案

我已经很晚了,但是由于它在Google搜索中突然弹出,因此我想当提到您不能执行提交者想要的操作时,提到所选答案是不正确的。您可以使用...直接激活该控件。

I'm getting to this very late but since it popped up in a google search for something else, I thought I'd mention the selected answer is incorrect when it says you cannot do what the submitter wanted. You can activate the control directly with...

Application.CommandBars.ExecuteMso "CellFillColorPicker"

...,它将当前选择的颜色应用于所选范围。

...and it will apply the currently selected color to the selected range.

我实际上正在四处查看,是否可以通过VBA在控件的库中选择其他颜色,以便在首次打开工作簿时可以将默认颜色设置为不填充而不是黄色。

I'm actually looking around to see if there is a way to select another color in the control's gallery via VBA so I can make the default "no fill" rather than yellow when first opening a workbook.

这篇关于VBA-使用已经在Excel中选择的颜色填充单元格内部的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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