Module
Contents
Index 🔎︎

# Erl Function

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

## Sintaksis:

    Erl

## Nilai hasil:

Integer

## Parameter:

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

## Contoh:

    Sub ExampleError

    On Error GoTo ErrorHandler ' Set up error handler

    Dim iVar As Integer

    Dim sVar As String

    Kesalahan REM karena berkas yang tidak ada

        iVar = Freefile

        Open "\file9879.txt" For Input As #iVar

        Line Input #iVar, sVar

        Close #iVar

        Exit Sub

    ErrorHandler:

        MsgBox "Kesalahan " & Err & ": " & Error$ + chr(13) + "Pada baris : " + Erl + chr(13) + Now , 16 ,"sebuah kesalahan telah terjadi"

    End Sub