tugas3

program3

Private Sub Cmdbatal_Click()

Cbokode.SetFocus

Cbokode.Text = “”

Txtjb.Text = “”

Txtpeng.Text = “”

Txttt.Text = “”

Txtpenerbit.Text = “”

Txtharga.Text = “”

End Sub

Private Sub Cmdkeluar_Click()

End

End Sub

Private Sub Cmdlagi_Click()

Cbokode.SetFocus

Cbokode.Text = “”

Txtjb.Text = “”

Txtpeng.Text = “”

Txttt.Text = “”

Txtpenerbit.Text = “”

Txtharga.Text = “”

End Sub

Private Sub Cmdproses_Click()

Dim S As String

Txttt.Text = “20” & Right(Cbokode, 2)

S = Mid(Cbokode, 3, 3)

If S = “SIM” Then

Txtjb.Text = “Sistem Informasi Manajemen”

Txtpeng.Text = “Yati Nur Oktavia”

Txtharga.Text = “75900”

ElseIf S = “EDP” Then

Txtjb.Text = “ElektronikData Processing”

Txtpeng.Text = “Imam Tarmizi”

Txtharga.Text = “62000”

ElseIf S = “MNJ” Then

Txtjb.Text = “Manajemen”

Txtpeng.Text = “Valentina Mariana Adiwianti”

Txtharga.Text = “42000”

ElseIf S = “CDR” Then

Txtjb.Text = “Corel Draw”

Txtpeng.Text = “Riyan Suhandi”

Txtharga.Text = “53000”

ElseIf S = “RPL” Then

Txtjb.Text = “Rekayasa Perangkat Lunak”

Txtpeng.Text = “Sinta Umpu Singa”

Txtharga.Text = “83000”

End If

S = Left(Cbokode, 1)

If S = “A” Then

Txtpenerbit.Text = “Andi Offset Yogyakarta”

ElseIf S = “I” Then

Txtpenerbit.Text = “Indah Surabaya”

ElseIf S = “S” Then

Txtpenerbit.Text = “Salemba Empat”

ElseIf S = “E” Then

Txtpenerbit.Text = “Elek Media Komputindo”

ElseIf S = “M” Then

Txtpenerbit.Text = “Maxicom”

End If

End Sub

Private Sub Form_Load()

Cbokode.AddItem “A-SIM-01”

Cbokode.AddItem “I-EDP-02”

Cbokode.AddItem “S-MNJ-03”

Cbokode.AddItem “E-CDR-04”

Cbokode.AddItem “M-RPL-05”

End Sub

Iklan