Yes, catch the error (if 5 is catchable):
VB Code:
  1. On Error Goto SmackTheProgrammerForHavingAnError
  2.  
  3. ' la de da de da...
  4. ' Error here
  5.  
  6. Exit Sub
  7.  
  8. SmackTheProgrammerForHavingAnError:
  9.     Msgbox "Hey! Why are you getting an error 5? Bad!"