Searching...
Sunday, August 4, 2013

Color Palette in Excel VBA

Many a times you will need to show colors at run time for your cool Excel application. A good mix of Colors can make a application more attractive and make users happy. 

To fill a cell using VBA following code can be used


yoursheet.Cells(i + 2, 1).Interior.ColorIndex = color_num


and to change font color using VBA following code can be used

yoursheet.Cells(i + 2, 2).Font.ColorIndex = color_num

Where 'yoursheet' is the sheet you are dealing with in your VBA code and 'color_num' is the value of color you wish to use. Following is the Color Palette for your reference

  

To view the full Palette please follow the below link.


0 comments:

Post a Comment

:) :)) ;(( :-) =)) ;( ;-( :d :-d @-) :p :o :>) (o) [-( :-? (p) :-s (m) 8-) :-t :-b b-( :-# =p~ $-) (b) (f) x-) (k) (h) (c) cheer
Click to see the code!
To insert emoticon you must added at least one space before the code.

 
Back to top!