0
With the code below:
Application.ScreenUpdating = False
Application.EnableCancelKey = xlDisabled
On Error GoTo ErrorHandler
'Código
Exit Sub
ErrorHandler:Application.ScreenUpdating = True
'Código caso erro
End Sub
Screenupdating = False coming before On Error Goto Errorhandler in the code, interferes with the On Error application?
An explanation in English that I like very much is of this website. Does not interfere with the application of
On Error
, just take a test by inserting a split by zerox = 1 / 0
. You will see that theOn Error
is applied correctly. Go through the code step-by-step with the keyF8
.– danieltakeshi
Very good this site.
– Antonio Santos