#ERROR Trapping

  • Thread starter Thread starter Lee Peedin
  • Start date Start date
L

Lee Peedin

Sorry if this has been asked before, but didn't find anything in my
search.

If there a way to determine if the value of a cell formula results in
a #ERROR, #NAME, etc.

If you attempt to use ActiveX to retrieve a "value" of a cell with a
calculation error you application will crash.

Hoping there is some cell property or even worksheet property that
that will indicate if the cell contains a "real" error.

For an example, simply set the value of cell A1 to asdf*1 and then try
to retrieve it's value.

Thanks
Lee
 
Hi
to test for a #DIV/0 error you may sue something like
on error resume next
if activecell.value = CVErr(2007) then
activecell.clearcontents
end if
on error goto 0
 
Thanks Frank,
You solution is fine when using a language that supports "on error
resume next"; however, I was hoping for a solution that would work in
something other that VBScript or VBA.

Lee
 

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