![]() |
Returning Error from Functions
I want to return "#N/A" and "#DIV/0" errors from a user define
function. Can someone help? Thanks Leni -- Message posted from http://www.ExcelForum.com |
Returning Error from Functions
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/ |
Returning Error from Functions
cvErr(xlErrNA)
cvErr(xlErrDiv0) ? cvErr(xlErrNA) Error 2042 ? cvErr(xlErrDiv0) Error 2007 -- Regards, Tom Ogilvy "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/ |
Returning Error from Functions
|
All times are GMT +1. The time now is 05:13 PM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com