![Copper Mountain Technologies PLANAR TR1300/1 Programming Manual Download Page 19](http://html1.mh-extra.com/html/copper-mountain-technologies/planar-tr1300-1/planar-tr1300-1_programming-manual_2666189019.webp)
Error Handling
19
In the second example,
On Error GoTo ErrHandler
directive instructs VB to interrupt
the program execution when the error is detected and to pass control to
ErrHandler
label.
Dim app
Public Sub HandleError2()
Set app = CreateObject("TRVNA.Application")
On Error GoTo ErrHandler
app.SCPI.PARameter.DEFine = "S13"
...
Exit Sub
ErrHandler:
Msg = "Error # " & Str(Err.Number) & " was generated by " &_
Err.Source & Chr(13) & Err.Description
MsgBox Msg,,"Error"
End Sub