RSS

latihan vb

vbPrivate Sub CMDBATAL_Click()
TXTKODE.SetFocus
TXTKODE.Text
TXTJUDUL.Text
TXTPENGARANG.Text
TXTTAHUN.Text
TXTPENERBIT.Text
TXTHARGA.Text
End Sub

Private Sub CMDKELUAR_Click()
Unload Me
End Sub

Private Sub CMDLAGI_Click()
TXTKODE.SetFocus
TXTKODE.Text
TXTJUDUL.Text
TXTPENGARANG.Text
TXTTAHUN.Text
TXTPENERBIT.Text
TXTHARGA.Text
End Sub

Private Sub CMDPROSES_Click()
Dim K As String
K = Left(TXTKODE.Text, 3)
If K = “SIM” Or K = “sim” Then
TXTJUDUL = “SISTEM INFORMASI MENEJEMEN”
TXTPENGARANG = “FADIYA ULFA”
TXTHARGA = “75900”
ElseIf K = “EDP” Or K = “edp” Then
TXTJUDUL = “ELEKTRONIK DATA PROCESSING”
TXTPENGARANG = “NURUL AGUSTINA”
TXTHARGA = “62000”
ElseIf K = “MNJ” Or K = “mnj” Then
TXTJUDUL = “MENEJEMEN”
TXTPENGARANG = “RIAN HIDAYAT”
TXTHARGA = “42000”
ElseIf K = “CDR” Or K = “cdr” Then
TXTJUDUL = “COREL DRAW”
TXTPENGARANG = “SITI NUR KHOTIMAH”
TXTHARGA = “53000”
ElseIf K = “RPL” Or K = “rpl” Then
TXTJUDUL = “REKAYASA PERANGKAT LUNAK”
TXTPENGARANG = “WINDA ERLIANTI”
TXTHARGA = “83000”
End If
K = Right(TXTKODE.Text, 1)
If K = “A” Or K = “a” Then
TXTPENERBIT = “ANDI OFFSET YOGYAKARTA”
ElseIf K = “I” Or K = “i” Then
TXTPENERBIT = “INDAH SURABAYA”
ElseIf K = “S” Or K = “s” Then
TXTPENERBIT = “SALEMBA EMPAT”
ElseIf K = “E” Or K = “e” Then
TXTPENERBIT = “ELEK MEDIA KOMPUTINDO”
ElseIf K = “M” Or K = “m” Then
TXTPENERBIT = “MAXICOM”
End If
TXTTAHUN.Text = “20” & Mid(TXTKODE.Text, 5, 2)
End Sub

 

 

Tinggalkan Balasan

Isikan data di bawah atau klik salah satu ikon untuk log in:

Logo WordPress.com

You are commenting using your WordPress.com account. Logout / Ubah )

Gambar Twitter

You are commenting using your Twitter account. Logout / Ubah )

Foto Facebook

You are commenting using your Facebook account. Logout / Ubah )

Foto Google+

You are commenting using your Google+ account. Logout / Ubah )

Connecting to %s

 
%d blogger menyukai ini: