tiredofit
Well-known Member
- Joined
- Apr 11, 2013
- Messages
- 1,924
- Office Version
- 365
- 2019
- Platform
- Windows
In the sub below, should the On Error GoTo 0 be placed immediately after the line that might cause an error or should it be placed at the end, or indeed in both places?
Code:
On Error GoTo Errhandler
Worksheets("Sheet10").Activate
'On Error GoTo 0 'SHOULD THIS BE PLACED HERE???????
Range("A1").Value = 123
GoTo Anothersub
Errhandler:
Worksheets.Add.Name = "Sheet10"
Anothersub:
On Error GoTo 0
Call SomeModule.SomeSub