LibreOfficeDev 25.8 Help
འཛོལ་བ་འབྱུང་ཚ་བའི་ཤུལ་ལུ་འཛོལ་བ་ལེགས་སྐྱོང་པ་རྒྱུན་ལས་ཅིག་ལྕོགས་ཅན་བཟོཝ་ ཡང་ན་ལས་རིམ་ལག་ལེན་འཐབ་ནི་བསྐྱར་ལོག་འབདཝ་ཨིན།
  
On [Local] Error {GoTo Labelname | GoTo 0 | Resume Next}
ཁ་ཡིག་མིང་ ལུ་འགྱོ་: འཛོལ་བ་འབྱུང་པ་ཅིན་ འཛོལ་བ་ལེགས་སྐྱོང་འཐབ་པའི་རྒྱུན་ལས་"Labelname" གྱལ་ལུ་འགོ་བཙུགས་མི་ལྕོགས་ཅན་བཟོཝ་ཨིན།
བསྐྱར་ལོག་ཤུལ་མ་: འཛོལ་བ་འབྱུང་པ་ཅིན་ལས་རིམ་དང་གཅིག་ཁར་གསལ་བཤད་འཛོལ་བ་འབྱུང་ཡོད་མི་ནངགསལ་བཤད་རྗེས་སུ་གྲངས་དེ་་ལག་ལེན་འཐབ་་ནི་འཕྲོ་མཐུདཔ་ཨིན།
༠་་ལུ་འགྱོ: ད་ལྟོའི་བྱ་སྒོའི་ལམ་ལུགས་ནང་འཛོལ་བ་ལེགས་སྐྱོང་པ་འདི་ལྕོགས་མིན་བཟོཝ་ཨིན།
Local: Optional. The keyword is a reminder the statement is local to the routine which invokes it; when the routine exits, this error handling is canceled automatically.
Sub ExampleReset
On Error GoTo ErrorHandler
    Dim iNumber As Integer
    Dim iCount As Integer
    Dim sLine As String
    Dim aFile As String
    aFile = "C:\Users\ThisUser\data.txt"
    iNumber = Freefile
    Open aFile For Output As #iNumber
    དཔར་བསྐྲུན་འབད#ཨའི་ཨང་ "This is a line of text"
    Close #iNumber
    iNumber = Freefile
    Open aFile For Input As iNumber
    For iCount = 1 To 5
        Line Input #iNumber, sLine
        If sLine <>"" Then
            Rem
        End If
    Next iCount
    Close #iNumber
    Exit Sub
ErrorHandler:
    Reset
    MsgBox "All files will be closed",  0,  "Error"
End Sub