Kode Program Tombol Kode Buku :
Private Sub CboKode_Click()
If CboKode.Text = "110" Then
TxtJudul.Text = "Photoshop"
TxtPenulis.Text = "Doni Albana"
TxtRak.Text = "R1"
ElseIf CboKode.Text = "111" Then
TxtJudul.Text = "Corel Draw"
TxtPenulis.Text = "Kerin Naoula"
TxtRak.Text = "R2"
ElseIf CboKode.Text = "112" Then
TxtJudul.Text = "Jaringan"
TxtPenulis.Text = "Jonathan Fernan"
TxtRak.Text = "R4"
ElseIf CboKode.Text = "113" Then
TxtJudul.Text = "LAN"
TxtPenulis.Text = "Goul"
TxtRak.Text = "R3"
ElseIf CboKode.Text = "114" Then
TxtJudul.Text = "PHP"
TxtPenulis.Text = "Law"
TxtRak.Text = "R5"
Else
TxtJudul.Text = "Java"
TxtPenulis.Text = "Rito"
TxtRak.Text = "R6"
End If
TxtTerlambat.SetFocus
End Sub
Kode Program Tombol Lagi :
Private Sub CmdLagi_Click()
TxtJudul.Text = ""
TxtPenulis.Text = ""
TxtRak.Text = ""
CboKode.Text = ""
TxtNama.Text = ""
TxtTerlambat.Text = ""
TxtDenda.Text = ""
TxtNama.SetFocus
End Sub
Kode Program Tombol Keluar :
Private Sub CmdKeluar_Click()
If MsgBox("Anda Yakin Ingin Keluar", vbYesNo, "kotak pesan") = vbYes Then
End
End If
End Sub
Kode Sub Form Load :
Private Sub Form_Load()
CboKode.AddItem "110"
CboKode.AddItem "111"
CboKode.AddItem "112"
CboKode.AddItem "113"
CboKode.AddItem "114"
CboKode.AddItem "115"
End Sub
Kode Program Tombol Denda :
Private Sub TxtTerlambat_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then
TxtDenda.Text = Val(TxtTerlambat.Text) * 3000
End If
End Sub
Tidak ada komentar:
Posting Komentar