vba Interior.Color

HWL

Active Member
Joined
Dec 1, 2009
Messages
462
I have a macro where I set a cell's Interior.Color to 11851260 which is a standard light orange. Then when I reset it to the default no fill which is 16777215 the blue grid line is gone and it just looks funky. What am I doing wrong? Maybe something besides Interior.Color?

SAMPLE CODE to test
Code:
range("a1").Interior.color = 11851260 'light orange
range("a1").Interior.color = 16777215 'no fill

Thanks for any ideas
 

Excel Facts

Show numbers in thousands?
Use a custom number format of #,##0,K. Each comma after the final 0 will divide the displayed number by another thousand
Perhaps

Code:
Range("A1").Interior.ColorIndex = xlNone

That did it! Now just out of curiousity and consistency; I wonder what the .Interior.ColorIndex would be for the .Interior.Color = 11851260 'light orange.

Is there are table/matrix somewhere?
Thanks much
 
Upvote 0
Not sure if you already found one since you posted this a long time ago, but maybe for anyone who's reading this for answers:
There's a 56 ColorIndex chart that I found on Color Palette and the 56 Excel ColorIndex Colors. Unfortunately it doesn't have the Color Chart with those big numbers, but hopefully you can use the ColorIndex chart to find the light orange you want.
 
  • Like
Reactions: HWL
Upvote 0

Forum statistics

Threads
1,213,546
Messages
6,114,256
Members
448,557
Latest member
richa mishra

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top