View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Tom Ogilvy Tom Ogilvy is offline
external usenet poster
 
Posts: 27,285
Default application.caller

set rng = Application.Caller

v = rng.Value

will give you the value of the cell containing the formula (which is
considered the calling cell).

--
Regards,
Tom Ogilvy


"Alexander" wrote in message
...
Thanks.

Is there a reliable way to get a value of calling cell? So the UDF can
return that value under some circumstances.

Cheers,
Alex.

"Tom Ogilvy" wrote:

? cvErr(xlErrRef)
Error 2023

this is the same as the #Ref error

I doubt it is caused by application caller, but more likely by the
argument
you are furnishing to the function.

--
Regards,
Tom Ogilvy


"Alexander" wrote:

Hi,

Application.Caller in my UDF function is always Error 2023 (called due
to
the cell change). Why?

Cheers,
Alex.