NIM : 0907055021
If Lanjut Then
If diskon.Text = "" Then
biayatotal = harga * Jumlah.Text
htotal = "Rp. " & biayatotal
ElseIf diskon.Text = "0" Then
biayatotal = harga * Jumlah.Text
htotal = "Rp. " & biayatotal
Else
biaya = harga * Jumlah.Text
jmldiskon = biaya * diskon.Text / 100
biayatotal = biaya - jmldiskon
htotal.Caption = "Rp. " & biayatotal
End If
Else
Pesan_Error (Kode_Error)
End If
End Sub
Function Pesan_Error(Error)
Select Case Error
Case 1
MsgBox "Masukkan Nama!", vbExclamation, "Pemberitahuan"
Case 2
MsgBox "Pilih Kendaraan!", vbExclamation, "Pemberitahuan"
Case 3
MsgBox "Masukkan Jumlah Tiket!", vbExclamation, "Pemberitahuan"
End Select
End Function
Gambar Form