Erl Function

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

แƒกแƒ˜แƒœแƒขแƒแƒฅแƒกแƒ˜


Erl

แƒ“แƒแƒ‘แƒ แƒฃแƒœแƒ”แƒ‘แƒฃแƒšแƒ˜ แƒ›แƒœแƒ˜แƒจแƒ•แƒœแƒ”แƒšแƒแƒ‘แƒ:

Integer

Parameters:

แƒจแƒ”แƒœแƒ˜แƒจแƒ•แƒœแƒ˜แƒก แƒฎแƒแƒขแƒฃแƒšแƒ

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


แƒ›แƒแƒ’แƒแƒšแƒ˜แƒ—แƒ˜:


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

Please support us!