When I use color number 15325914 directly it shades the cell in correct color (Light Grayish Blue).
Activecell.Interior.Color = 15325914
Light Grayish Blue:
When I use the same color number 15325914 when it is stored in a constant it shades the cell in black color (When it is already not in the 15325914 color).
Public Const LightGrayishBlue = 15325914
Activecell.Interior.Color = LightGrayishBlue
Your code should work when everything is setup correctly (have used similar code 1000nds of times).
The most likely reason is that
LightGrayishBlue
has the value 0 when assigned as interior color. But the black color can have several reasons:Option Explicit
to catch such cases.LightGrayishBlue
and press Shift+F2 (goto definition): Does it jump to the Const definition or somewhere else? Or does it show an error "Identifier under cursor is not recognized"LightGrayishBlue
. Is it 0 or does it show the expected value?