Trapping errors

  • Thread starter Thread starter ssemtaf
  • Start date Start date
S

ssemtaf

Hi,
I have a sheet with some controls. If a debug situation occurs I
don't want the user to flung into vba land. A calming MsgBox with some
advice to do something or other would be less traumatic. Does anyone
have some code for this please.
 
Lots of times, you can just turn off error checking, do the thing that may cause
an error, then check for an error, and turn error checking back on.

On error resume next
'some code that could cause an error
if err.number <> 0 then
err.clear
msgbox "Don't Panic"
'more code???
end if
 

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