View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Ron Rosenfeld Ron Rosenfeld is offline
external usenet poster
 
Posts: 5,651
Default UDF Returning #N/A

On Fri, 21 Oct 2005 18:41:02 -0700, KAHAUS
wrote:

With a user defined function saved in an *.xla add-in...
How can I make the function return the worksheet error value #N/A?

as an example (that doesn't work)

Function MyFunction(x,y, optional z)
MyFunction = application.worksheetfunction.NA()
End Function


Function foo()
foo = CVErr(xlErrNA)
End Function


--ron