Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 6
Default Conditional formatting & interior color

I have a cell defined with a conditional format that when the value is
<0 the cell is filled in Yellow.

After the form has been completed by the user, they press a "Done"
button. The button has code to check for errors. I was trying to check
for errors by looking for yellow cells but have not been successful.
Here is the code I'm using.

If Worksheets("Kern Form").Range(Cells(RowIndx, ColIndx),
Cells(RowIndx, ColIndx)) _
.Interior.ColorIndex = 6 Then <-- using this there is never
an error
' .FormatConditions(1).Interior.ColorIndex = 6 Then <-- using
this there is always an error
ErrorFnd = True
End If

What SHOULD I be checking?

Thank You all in advance!

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,272
Default Conditional formatting & interior color

Conditional formatting does not set the Interior.Colorindex property.

You need to look at the FormatConditions for the cell.

--

HTH

Bob Phillips
... looking out across Poole Harbour to the Purbecks
(remove nothere from the email address if mailing direct)

"Paul S Panoff" wrote in message ...
I have a cell defined with a conditional format that when the value is <0 the cell is filled in Yellow.
After the form has been completed by the user, they press a "Done" button. The button has code to check for errors. I was trying to check for errors by looking for yellow cells but have not been successful. Here is the code I'm using.

If Worksheets("Kern Form").Range(Cells(RowIndx, ColIndx), Cells(RowIndx, ColIndx)) _
.Interior.ColorIndex = 6 Then <-- using this there is never an error
' .FormatConditions(1).Interior.ColorIndex = 6 Then <-- using this there is always an error
ErrorFnd = True
End If

What SHOULD I be checking?

Thank You all in advance!

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Conditional formatting & interior color

Here's a link to a fairly complicated solution:

http://www.cpearson.com/excel/CFColors.htm



--
Message posted from http://www.ExcelForum.com

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
color the interior of a range Pierre via OfficeKB.com Excel Worksheet Functions 1 November 2nd 05 12:55 PM
Print without Interior Color bhofsetz Excel Discussion (Misc queries) 2 July 19th 05 04:28 PM
interior.colorindex used with conditional formatting Wazooli Excel Worksheet Functions 7 February 25th 05 01:01 AM
Interior Cell color Pellechi Excel Programming 1 September 23rd 03 03:39 PM


All times are GMT +1. The time now is 06:21 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"