View Single Post
  #2   Report Post  
Dave Peterson
 
Posts: n/a
Default

Option Explicit
Function myFunc(myVal As Variant) As Variant

If IsNumeric(myVal) Then
myFunc = myVal * 2
Else
myFunc = CVErr(xlErrNA)
End If

End Function



DMc2005 wrote:

Hi

How can i get a user defined function to return an error code like #n/a.

many thank

d


--

Dave Peterson