View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
greencecil greencecil is offline
external usenet poster
 
Posts: 4
Default Font colour change based on Rgb codes given in specific cells

I have written the following code to change cell font colour to RGB values
222, 155, 55

Sub CellColourChange()

' Set the font colour of cell G18 to RGB scale from answers in
questionnaire.
Range("G18").Select
Selection.Font.Color = RGB(222, 155, 55)

End Sub

However, I would really like to make this code more advanced, getting the
rgb values from cells (e.g. I18, j18, k18). I tried using
Font.Color = RGB("I18", "j18", "k18") instead of the values I used in the
first version. This clearly does not work. Can anyone tell me how to do this?
I'd appreciate the help a lot.