Professional Documents
Culture Documents
Catatan Tambahan1
Catatan Tambahan1
TOMBOL ENTER
3. ON ERROR GOTO 0
Private Sub BTN_PROSES_Click(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles BTN_PROSES.Click
On Error GoTo salah 'apabila error maka loncat ke ErrHandler:
Dim A As Integer
On Error GoTo 0
ListBox1.Items.Clear()
For A = 1 To TXTBIL.Text
ListBox1.Items.Add("Visual Basic")
Next
Exit Sub
salah:
MsgBox("Salah Input Data", MsgBoxStyle.Critical, "Perhatian")
'atau
‘MsgBox Err.Description
TXTBIL.Focus()
End Sub