How do I get the corresponding Hex value of an RGB color in Excel/VBA?

后端 未结 5 1182
野的像风
野的像风 2020-12-09 06:01

I\'m trying to set a public const of a color in my VBA code. Normally, I can use:

Dim BLUE As Long
BLUE = RGB(183, 222, 232)

However, ther

5条回答
  •  孤城傲影
    2020-12-09 06:42

    You'll have to reverse the bytes into order

    BLUE = &HE8DEB7
    

    to get the correct color value.

提交回复
热议问题