User-defined Error Values

  • Thread starter Thread starter Phil Bewig
  • Start date Start date
P

Phil Bewig

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top