tsunami

log in
history

Visual Basic 6: Error line numbers

Luke Breuer
0001-01-01 05:00 UTC

The following prints Erl = 3. If the 3: is removed, it will print Erl = 2.
Private Sub Form_Load()

    Dim n As Integer

    On Error GoTo Hell
1:
2:
3:  n = 1 / 0
4:
5:
    Exit Sub
Hell:
    MsgBox ("Erl = " & Erl)
End Sub