[英]Button to change the color of font in Excel
我希望在 Excel 中創建一個按鈕,它將更改特定字段中字體的顏色。 這可能嗎? 預先感謝您的支持。
我看過下面概述的帖子 - 但到目前為止還沒有做到:
Private Sub CommandButton1_Click()
CommandButton1.Font.Size = 18
End Sub
您必須使用.Font.Color
中的.Range
。 代替Range("A1")
使用您要指定的單元格,並且RGB()
function 根據它的 RGB 代碼返回顏色給您。 您可以在 Adobe Color等許多地方檢查顏色 RGB 代碼,或單擊 Excel 工具欄上的更多顏色選項
Private Sub CommandButton1_Click()
Sheet1.Range("A1").Font.Color = RGB(0,0,0)
End Sub
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.