View Single Post
  #10   Report Post  
Posted to microsoft.public.excel.programming
Jim Thomlinson[_5_] Jim Thomlinson[_5_] is offline
external usenet poster
 
Posts: 486
Default Evaluation of Conditional Formats

Where is this private message board? Any possibility of allowing an aspiring
smart person to listen in?
--
HTH...

Jim Thomlinson


"Dave Peterson" wrote:

Stephen Bullen chimed in with his thoughts. I included them at the bottom of
this message.

Just to add to the weirdness...

I put a beep in the code:

Option Explicit
Public Function HasComment(ByVal Cell As Range) As Boolean
Beep
'MsgBox Cell.Address
If Cell.Comment Is Nothing Then
HasComment = False
Else
HasComment = True
End If
End Function

Sometimes, I could just mouse over the cell and I could hear the beep.
Sometimes not. I heard the beep when I had a simple formula in the cell
(=hascomment(a1)--in D6). Sometimes, I heard the beep on a cell that used that
as a conditional formatting formula.

Just swapping from one application back to excel cause the beep to sound.

That sure gives credence to the screen updating theory.

And when I uncommented that msgbox line. I was getting the active cell to
flash, just changing the selection--well, until xl2003 crashed!

===
Stephen, I gonna post this message to the public newsgroup, too.

Stephen Bullen wrote:

Hi Tushar,

But, for other cells it either consistently does not work or works
erratically.


From what I can tell, it's also based on when Excel thinks it needs to
redraw the screen, and only those cells in the visible window have
their cf's evaluated. So, for example, if your editing of a formula
means that the edited text overlaps some cells, those cells will need
to be redrawn and hence their cf's are updated.

It's easy enough to test the behaviour - just create a UDF that logs
its address to a text file, then see what's evaluated when.

Regards

Stephen Bullen


--

Dave Peterson
<<snipped