The On Error statement causes Visual Basic for Applications to start or stop error trapping. The On Error statement also specifies a set of statements to execute if ...
support.microsoft.com