LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 18
Default Cell Shading Colour Property

Hi

The first function gives a cell's shading colour-index property and the
second converts it to a description. Has anyone the list of indexes and a
colour description so I no longer need the Else statement near the end. I
wnated to cover the basic colours in the Format cells tab, 40+ I suppose

Thanks

Tim

PS hope the US colleagues will forgive "colour" variant spelling :)

Function ShowColourIndexNo(Cell As Object) As Integer
ShowColourIndexNo = Cell.Interior.ColorIndex
End Function

Function ConvertColorIndexToText(Cell As Object) As String
Dim Temp As Variant

Select Case Cell.Value
Case -4142
Temp = "No colour"
Case 3
Temp = "Bright red"
Case 4
Temp = "Bright green"
Case 5
Temp = "Dark blue"
Case 34
Temp = "Light blue"
Case 35
Temp = "Light green"
Case Else
Temp = "Non-specified"
End Select

ConvertColorIndexToText = Temp

End Function


 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Change selected cell shading colour Chas Excel Discussion (Misc queries) 2 July 7th 09 06:54 PM
How do I change the shading colour when selecting cells? Toby Hudson Excel Discussion (Misc queries) 1 January 21st 09 04:29 PM
How can colour of cell shading be fixed to one colour Tabrez Excel Discussion (Misc queries) 2 September 23rd 08 04:55 PM
Is there a way to add cells based on their shading / fill colour? ChefAtSea Excel Discussion (Misc queries) 2 July 4th 07 01:22 PM
How do I customise the colour of cell shading? Thank you Anna Excel Discussion (Misc queries) 1 October 17th 05 01:01 PM


All times are GMT +1. The time now is 04:57 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"