Line labels can appear on the same line as statements, which can cause excessive indenting of code.
Sub foo()
On Error GoTo CatastrophicDivideByZeroErrorHandler
Debug.Print 1 / 0
Exit Sub
CatastrophicDivideByZeroErrorHandler: MsgBox "Too much ZERO"
End Sub
Would, optionally, be better rewritten and indented as:
Sub foo()
On Error GoTo CatastrophicDivideByZeroErrorHandler
Debug.Print 1 / 0
Exit Sub
CatastrophicDivideByZeroErrorHandler:
MsgBox "Too much ZERO"
End Sub
Line labels can appear on the same line as statements, which can cause excessive indenting of code.
Would, optionally, be better rewritten and indented as: