27 Exception using On Error GoTo in VB.NET

Code :

Public Class Form1
    Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click
        Dim a, b As Integer
        On Error GoTo s1
        a = TextBox1.Text
        b = TextBox2.Text

        MsgBox(a & vbTab & b)
        End
s1:     MsgBox("Error occurend")
    End Sub
End Class





Output:



Previous
Next Post »