View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Phil Bewig Phil Bewig is offline
external usenet poster
 
Posts: 6
Default 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