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: 5
Default Color Palette

I'm working with VB in Excel 2003, and I need more colors than are
offered on the default palette. Does anyone know if and where I might
be able to get a broader range of colors and their codes? Here's what
my program looks like:

Sub ColorTest()

'Changes cell color based on adjacent to the left cell value
j = 2
While j < 7
i = 2
While ActiveSheet.Cells(i, j - 1) < ""
ActiveSheet.Cells(i, j).Interior.ColorIndex = Switch( _
ActiveSheet.Cells(i, j - 1) < 0.5, 3, _
ActiveSheet.Cells(i, j - 1) < 1, 9, _
ActiveSheet.Cells(i, j - 1) < 1.5, 6, _
ActiveSheet.Cells(i, j - 1) < 2, 12, _
ActiveSheet.Cells(i, j - 1) < 2.5, 4, _
ActiveSheet.Cells(i, j - 1) < 3, 10, _
ActiveSheet.Cells(i, j - 1) < 3.5, 50, _
ActiveSheet.Cells(i, j - 1) < 4, 8, _
ActiveSheet.Cells(i, j - 1) < 4.5, 5, _
ActiveSheet.Cells(i, j - 1) < 5, 11, _
ActiveSheet.Cells(i, j - 1) < 5.5, 7, _
ActiveSheet.Cells(i, j - 1) < 6, 13, _
ActiveSheet.Cells(i, j - 1) < 6.5, 15, _
ActiveSheet.Cells(i, j - 1) < 7, 16)
i = i + 1
Wend
j = j + 2
Wend

End Sub

 
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
Color Palette JAD Excel Discussion (Misc queries) 0 November 30th 07 04:21 PM
Bring up Color Palette to select color pokdbz Excel Discussion (Misc queries) 4 August 6th 07 10:13 PM
Color Palette, color disappears Emil Excel Discussion (Misc queries) 3 November 29th 05 05:07 AM
VBA color palette Holanmeg Excel Programming 1 April 5th 05 09:27 AM
Changing color in color palette Dave Peterson Setting up and Configuration of Excel 0 December 12th 04 02:39 PM


All times are GMT +1. The time now is 05:21 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"