Hi All,
I am working on an application in which I have to call an excel file and have to find the forecolor of a particular cell whether it is green or red. Would anybody please let me know how I can implement this functionality in my application.
thanks & regards
Rahul
There is no enum for this, but if you record a macro, you will see that green is 10 and red is 3:
- Sub Macro1()
-
Range("A1") = "Red"
-
Range("A1").Font.ColorIndex = 3
-
Range("A2") = "Green"
-
Range("A2").Font.ColorIndex = 10
-
End Sub
Excel MVP, Dave McRitchie, has a nice chart of all the colors,
http://www.mvps.org/dmcritchie/excel/colors.htm#Chart