Looking at the online help for "On Error", "On error GoTo 0"
disables any enabled error handler in the current procedure, so you
need to get rid of that if you want to keep your error handler.
Then, to make sure your code does not fall into your error handler
by mistake, you generally put an "Exit Sub" before it.
Next, you need a Resume (rather than Loop) at the end of the error
handler.