I have approximatedly 34 different desired color combinations I would 
like to colorize certain cells based on selected value. I.e., in 
English, it would be something like:
Black=0 :White=2        :Red=3  :Green=4
Blue=5  :Yellow=6       :Magenta=7      :Cyan=8
Get value of AK40, call it "Supply"
Select case "Supply"
        Case 101:
                DoThis("C10"),Green,White
                DoThis("J10"),Green,White
                DoThis("AB10"),Green,White
        Case 201
                DoThis("C10"),Blue,White
                DoThis("J10"),Blue,White
                DoThis("AB10"),Blue,White
        Case else
                .Value= "ERROR. UNRECOGNIZED CODE VALUE."
End Select

Sub DoThis(ThisCell As Range, BackColor,FontColor) with ThisCell
        .Interior.ColorIndex = BackColor
        .Interior.Pattern = xlSolid
        .Interior.ColorIndex = FontColor
End With
End Sub


I may add more colors later if my needs justify it, but for the 
moment my problem seems to be my code. I don't see an error, 
according to my Excel book I have, it -should- work, but since it 
isn't I must have an error in there somewhere. Is obvious to anyone 
please? And no, it is not homework- I graduated college years ago. 
Upon compiling, it does not return an error. I am just not sure what 
to change or correct.

Thank you for allowing me to join this group.

Robert Carneal

--~--~---------~--~----~------------~-------~--~----~
----------------------------------------------------------------------------------
Some important links for excel users:
1. Excel and VBA Tutorials(Video and Text), Free add-ins downloads at 
http://www.excelitems.com
2. Excel tutorials at http://www.excel-macros.blogspot.com
3. Learn VBA Macros at http://www.vbamacros.blogspot.com
4. Excel Tips and Tricks at http://exceldailytip.blogspot.com
 

To post to this group, send email to excel-macros@googlegroups.com
If you find any spam message in the group, please send an email to:
Ayush Jain  @ jainayus...@gmail.com or
Ashish Jain @ 26may.1...@gmail.com
<><><><><><><><><><><><><><><><><><><><><><>
HELP US GROW !!

We reach over 6,500 subscribers worldwide and receive many nice notes about the 
learning and support from the group. Our goal is to have 10,000 subscribers by 
the end of 2009. Let friends and co-workers know they can subscribe to group at 
http://groups.google.com/group/excel-macros/subscribe
-~----------~----~----~----~------~----~------~--~---

Reply via email to