Lenin,
Declare the function to return a Variant data type, and use CVErr
to create an error value. For example
Function Test() As Variant
Test = CVErr(xlErrDiv0)
' or
Test = CVErr(xlErrNA)
End Function
--
Cordially,
Chip Pearson
Microsoft MVP - Excel
Pearson Software Consulting, LLC
www.cpearson.com
"LeninVMS " wrote in
message ...
I want to return "#N/A" and "#DIV/0" errors from a user defined
function. Can someone help?
Thanks
Lenin
---
Message posted from http://www.ExcelForum.com/