View Single Post
  #4   Report Post  
Posted to microsoft.public.excel.programming
keepITcool keepITcool is offline
external usenet poster
 
Posts: 2,253
Default Excel 97 - Application.Iteration is always FALSE?

Getting snappy? umf?

THIS UDF:

Function Iter_Status()
If Application.Iteration Then
Iter_Status = "TRUE"
End If
End Function

Since it's return value is UNtyped, it cannot return a
False boolean value even if it wanted too.

it MAY return an Empty Variant or a string with "TRUE"

I cant reproduce the anomaly you describe.(xl97 and xlXP)
and I'm still wondering what your real UDF's code looks like.

What does your immediate screen show when you run my example code?




keepITcool

< email : keepitcool chello nl (with @ and .)
< homepage: http://members.chello.nl/keepitcool


(Umfriend) wrote:

keepITcool wrote in message
. ..
nonsense..

Could it be that you try to change iteration within the
a VBA function.. ???

Functions CANNOT change the environment when called from the
worksheet!


I know *that*. The code of the UDF is as provided by me. When calling
the UDF from a cell, it *always* returns FALSE. If I debug the UDF and
use the immediate window of VBA, I get on "? applicaiton.iteration" a
TRUE bfore the UDF is called, "FALSE" as soon as it is called and as
long as it is active/in debugging" and "TRUE" again after it has
finished.

The UDF, again, always returns FALSE even if
<Tools<Option<Calculation shows iteration to be TRUE.....

Thx anyway.