09-20-2010 08:29 AM
Hi guys,
I have to make a comparison between two cells into a worksheet. If there are different , I have to marked one of them with red color. I know that I have to use ActiveX to implement this property . I found an application that makes font color for a cell, but doesn't work - no appearance.
I wish to fill with color a cell, but I didn't find a "fill" property.
I you could help me it will be great.
Thanks, Samoth
Solved! Go to Solution.
09-20-2010 09:43 AM
Are you trying to change the font color, or the background color of the cell.
For the font color you are using the "Color" property. You should be using the "ColorIndex" property.
The easiest way to determine what properties/methods to access is to have Excel record a macro of what you want to do, then look at the generated VB code as that will tell you what ActiveX properties and methods to call.
If you don't already know, there's an Excel thread over in the Breakpoint forum with lots of examples and links to examples. Please DO NOT post questions in that thread, as it is a repository of links only.
09-20-2010 10:17 AM
I think you might be looking for the "FormatConditions" property of the Range object; see this thread for instructions on use...
09-20-2010 12:44 PM
I tried to color the background of the cell.
09-20-2010 01:23 PM
Well, if you're trying to change the background color of a cell, then why are you operating on the color of the font? That doesn't make much sense.To change the background color you need to select the Interior property of the range and then set the ColorIndex.
Any why are you marking your response as the solution? Did you already solve the problem? If so, please indicate what you did.
09-21-2010 12:34 PM
Sorry , I forgot to load the VI
09-21-2010 01:15 PM
OK. So do you have a question about this? You marked your response as the solution, so it's not clear whether you're asking for more help or not.
09-22-2010 12:14 AM
It's OK,thanks.
First time when I posted , I' ve explained that I found an application that colored the text font and my wish was to color the background of a cell to mark (after a comparison between two cells) as different .I didn't know exactly the name of the property for that (Interior property).
Sorry for my inaccurate post 🙂
Have a nice day, Samoth