C2vFE‖Erl Function

Contents
kyzWf‖

# 4oCiF‖Erl Function

jDwdD‖Returns the line number where an error occurred during program execution.

## oXQW5‖Syntax:

    Erl

## Bzkw7‖Return value:

EmEER‖Integer

## wfjUy‖Parameters:

rDQuJ‖The Erl function only returns a line number, and not a line label.

## 6m2qX‖Example:

    Sub ExampleError
    C82GD‖On Error GoTo ErrorHandler ' Set up error handler
    Dim iVar As Integer
    Dim sVar As String
    vWK8x‖' Error caused by non-existent file
        iVar = Freefile
        Open "\file9879.txt" For Input As #iVar
        Line Input #iVar, sVar
        Close #iVar
        Exit Sub
    ErrorHandler:
    A28Mi‖    MsgBox "Error " & err & ": " & Error$ + chr(13) + "In Line : " + Erl + chr(13) + Now , 16 ,"An error occurred"
    End Sub

Related Topics

Error-Handling Functions

Please support us!