By using booksticle.com you agree to our cookie policy, We and our partners operate globally and use cookies, for multiple purposes

 


On Error Resume Next

This statement tell VBA to reset the Err variable to 0 and whenever an error occurs just do the next statement.

Without this statement you have know way to handle errors.

If a sub or function has no error handling and an error occurs the code jumps out of the routine to the last on Error statement.

There is some danger to using this statement.

In ASP which is a version of VBA to run webpages, this is the only error handling you can use.

Example
on error resume next
sheets("no such sheet").select
if err = 9 then
  msgbox "No such sheet"
end if

   
Home | About | Videos | Websites | Jobs | FAQ | Privacy | Terms of Service | Edit | Feedback | Copyright © 2024 All Rights Reserved