![]() |
User-defined Error Values
I would like to write a VBA function to be called by users
in an Excel formula that either returns a value or, if the user has specified an impossible set of arguments, returns an error message "#MESG?" similar to the built-in messages "#NAME?" and "#VALUE?". It is important that the error be propagated to dependent cells, and that the returned value cause an error condition that can be properly identified by SpecialCells(xlCellTypeFormulas,xlErrors). Can anyone tell me how to do this? Many thanks, Phil |
User-defined Error Values
Hi
AFAIK you can't deine a user specific message this way "Phil Bewig" wrote: I would like to write a VBA function to be called by users in an Excel formula that either returns a value or, if the user has specified an impossible set of arguments, returns an error message "#MESG?" similar to the built-in messages "#NAME?" and "#VALUE?". It is important that the error be propagated to dependent cells, and that the returned value cause an error condition that can be properly identified by SpecialCells(xlCellTypeFormulas,xlErrors). Can anyone tell me how to do this? Many thanks, Phil |
All times are GMT +1. The time now is 08:57 PM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com