With so-called "jumpmarks" you can increase the stability of your code. Just take a look at the following lines:
Sub Test()
Dim whatever as Nothing
On Error GoTo ErrHndler
BeginCommandGroup "Error Handling"
 ....
Your code
 ....
GoAheadAndFinish:
ActiveDocument.EndCommandGroup
ActiveDocument.ActiveWindow.Refresh
Exit Sub

ErrHndler:
MsgBox "Error occured: " & Err.Description
Err.Clear
Resume GoAheadAndFinish
End Sub

The statement "On Error GoTo ErrHndler" tells our VBA application to execute the code commonly from top to bottom, and if any error occurs on execution, to jump right to the Jumpmark "ErrHndler" (skipping everything between this statement and the jumpmark). The Jumpmark is signed with a colon at the end, so that VBA knows how to treat it. Now the code execution continues below the jumpmark, popping a window telling us what kind of error occured and clears the error. After that the code tells to resume with a second jumpmark "GoAheadAndFinish". If you're stepping the code line by line with F8 you'll notice that now the execution will continue above the error handler jumpmark, exiting a CommandGroup (see the VBA macro Tip #1) , refreshing the window and finally ending the whole procedure alternatively with "Exit Sub" (you can use exact the same method with functions too).

The benefit of this method is simple: if NO error occurs, the code will be executed linear from top to bottom while the jumpmarks are ignored. That means the procedure is finished with "Exit Sub" instead of "End Sub" and the error handler remains unexecuted, which is right what we want. This error handling is useful and even necessary if you use the CommandGroup statements to speed up your code while making it more stable.

Tip provided by Maurice Beumers, CorelDRAW  Master, Graphic designer and illustrator.

Note: This tip is available in 3 languages (English, French and German).