Rabu, 13 Desember 2017

Tugas 3.5

Private Sub Command1_Click()
Dim A As String
A = Mid(Combo1, 1, 1)
If A = "A" Then
Text4 = "Abdi Offsyet Yogyakarta"
End If
A = Mid(Combo1, 3, 3)
If A = "SIM" Then
Text1 = "Sistem Informasi Manajemen"
Text2 = "Yati Nur Oktavia"
Text5 = "75900"
End If
A = Mid(Combo1, 7, 2)
If A = "01" Then
Text3 = "2001"
End If
A = Mid(Combo1, 1, 1)
If A = "I" Then
Text4 = "Indah Surabaya"
End If
A = Mid(Combo1, 3, 3)
If A = "EDP" Then
Text1 = "Electronik Data Processing"
Text2 = "Imam Tarmizi"
Text5 = "62000"
End If
A = Mid(Combo1, 7, 2)
If A = "02" Then
Text3 = "2002"
End If
A = Mid(Combo1, 1, 1)
If A = "S" Then
Text4 = "Irvan Bahari"
End If
A = Mid(Combo1, 3, 3)
If A = "MNJ" Then
Text1 = "MANAJEMEN"
Text2 = "Irvan Bahari"
Text5 = "79000"
End If
A = Mid(Combo1, 7, 2)
If A = "03" Then
Text3 = "2003"
End If
End Sub

Private Sub Command2_Click()
Combo1 = ""
Text1 = ""
Text2 = ""
Text3 = ""
Text4 = ""
Text5 = ""
End Sub

Private Sub Command3_Click()
Combo1 = ""
Text1 = ""
Text2 = ""
Text3 = ""
Text4 = ""
Text5 = ""
Combo1.SetFocus
End Sub

Private Sub Command4_Click()
Unload Me
End Sub

Private Sub Form_Load()
Combo1.AddItem "A-SIM-01"
Combo1.AddItem "I-EDP-02"
Combo1.AddItem "S-MNJ-03"
End Sub

Tidak ada komentar:

Posting Komentar