View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Andrew Taylor Andrew Taylor is offline
external usenet poster
 
Posts: 225
Default How to cause a #num! error


Function ReturnsHashNum()
ReturnsHashNum = CVErr(xlErrNum)
End Function

There are other error consts if you need them- xlErrNA.
xlErrDiv0, etc

Andrew



Ken Kazinski wrote:
Hi,

Is there a way to have a function return a error message? I would like one
of my functions to return a #num! error when the range passed to it is empty.

Thanks,

Ken