LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Fill color worksheet cell

Solved!
Go to solution

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

Download All
0 Kudos
Message 1 of 8
(3,808 Views)

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.

0 Kudos
Message 2 of 8
(3,789 Views)

I think you might be looking for the "FormatConditions" property of the Range object; see this thread for instructions on use...

 

 


Now is the right time to use %^<%Y-%m-%dT%H:%M:%S%3uZ>T
If you don't hate time zones, you're not a real programmer.

"You are what you don't automate"
Inplaceness is synonymous with insidiousness

0 Kudos
Message 3 of 8
(3,783 Views)
Solution
Accepted by topic author Samoth

I tried to color the background of the cell.

0 Kudos
Message 4 of 8
(3,768 Views)

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.

0 Kudos
Message 5 of 8
(3,757 Views)

Sorry , I forgot to load the VI

0 Kudos
Message 6 of 8
(3,730 Views)

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.

0 Kudos
Message 7 of 8
(3,721 Views)

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

0 Kudos
Message 8 of 8
(3,705 Views)