Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Excel / New Users / January 2006

Tip: Looking for answers? Try searching our database.

Conditional formatting bug in excel 2000 SP3

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
yoyo - 03 Jan 2006 23:43 GMT
Hello,

in excel 2000 sp3, i found a bug using conditional formatting.
Let's say i have two cells A1 and A2.
I want to set A2 backcolor according to A1 backcolor.
If i set conditional formatting on A2 cell, using =iscouleur("A1")
as the condition for the formatting.
Iscouleur is a custom VBA function defined as:

public function iscouleur(r as range) as boolean
    iscouleur=(r.interior.color>0)
end function

It works OK, but if I want to set manually the backcolor of A2, although
there is already a conditional formatting on the backcolor, then it
crash with "Memory cannot be read" or a "Floating calculation error".

Any idea if this is a known bug and if there is a workaround?

Thanks,
Lionel.
Bob Phillips - 04 Jan 2006 00:00 GMT
I am not getting this problem at all. Your CF is wrong as well, it should be

=IsCouleur(A1)

not

=IsColuler("A1")

as the latter is trying to pass a string value to a range argument, which is
invalid.

Also, should the function be

Public Function iscouleur(r As Range) As Boolean
   iscouleur = r.Interior.ColorIndex > xlColorindexNone
End Function

Signature

HTH

RP
(remove nothere from the email address if mailing direct)

> Hello,
>
[quoted text clipped - 17 lines]
> Thanks,
> Lionel.
yoyo - 06 Jan 2006 23:24 GMT
> I am not getting this problem at all. Your CF is wrong as well, it should be
>
[quoted text clipped - 12 lines]
>     iscouleur = r.Interior.ColorIndex > xlColorindexNone
> End Function

True, it is
IsCouleur(A1)

And whatever the test is, it shouldn't crash. Here i was testing that
the cell color was not black since Interior.color returns a long rgb value.
The problem is still there, it crashs!
It is a french version of Excel 2000 SP3 running on windows 2000 pro SP4.

Any other idea?
Thanks,
Lionel.
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.