L LeninVMS Apr 9, 2004 #1 I want to return "#N/A" and "#DIV/0" errors from a user define function. Can someone help? Thanks Leni
I want to return "#N/A" and "#DIV/0" errors from a user define function. Can someone help? Thanks Leni
C Chip Pearson Apr 9, 2004 #2 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
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
T Tom Ogilvy Apr 9, 2004 #3 cvErr(xlErrNA) cvErr(xlErrDiv0) ? cvErr(xlErrNA) Error 2042 ? cvErr(xlErrDiv0) Error 2007