Welcome to VBA Tips & Tricks.
All VBA related information will be posted on this blog. Of late, VBA has been disregarded by many software professionals for .Net, c# and other technologies. This blog will also post articles related to them too
Happy reading
Pages
▼
Wednesday, June 13, 2007
ColorIndex - Coloring Excel Sheet Cells
Highlight Color in Excel Cells
Colorindex is used to color the background of Excel Cells
'pretty sure it's -4142 Just try it or do like me: record a new macro in Excel, and change the color of a cell or character, stop the macro and look at the result with Alt-F11 in Modules
the ColorIndex property can be applied to other objects (eg Font, Border, Borders, FormatColor, Tab). right?
ReplyDeleteYes.
DeleteThanks but what is the code for blank (not white)?
ReplyDelete'pretty sure it's -4142
ReplyDeleteJust try it or do like me: record a new macro in Excel, and change the color of a cell or character, stop the macro and look at the result with Alt-F11 in Modules
blank (not white) equals -4142 (or xlColorIndexNone)
ReplyDeleteyou nutcase why would you need a code for no fill? time waster!!!!
ReplyDeleteIf you have already colored a sheet or cell and you want to blank it. Nutcase...
Delete