TUGAS 1

TUGAS 1 ADEL

Private Sub Cmdbatal_Click()
Txtnama.SetFocus
Txtnama = “”
Txtnpm = “”
Txtjr = “”
Txtprodi = “”
Txttm = “”
Txturut = “”
End Sub

Private Sub Cmdkeluar_Click()
Unload Me
End Sub

Private Sub Cmdlagi_Click()
Txtnama.SetFocus
Txtnama = “”
Txtnpm = “”
Txtjr = “”
Txtprodi = “”
Txttm = “”
Txturut = “”
End Sub

Private Sub Cmdproses_Click()
Dim JR, PS As String
Txttm = “20” & Left(Txtnpm, 2)
S = Mid(Txtnpm, 3, 1)
If S = “1” Then
JR = “SISTEM INFORMASI”
ElseIf S = “2” Then
JR = “TEHNIK INFORMATIKA”
ElseIf S = “3” Then
JR = “MANAJEMEN INFORMATIKA”
ElseIf S = “4” Then
JR = “KOMPUTER AKUNTANSI”
End If
Txtjr = JR

S = Mid(Txtnpm, 4, 2)
If S = “01” Then
PS = “STRATA SATU”
ElseIf S = “02” Then
PS = “DIPLOMA EMPAT”
ElseIf S = “03” Then
PS = “DIPLOMA TIGA”
ElseIf S = “04” Then
PS = “DIPLOMA DUA”
End If
Txtprodi = PS
Txturut = Right(Txtnpm, 3)
End Sub

TUGAS 1.2

Private Sub Txtnama_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then
Txtnpm.SetFocus
End If
End Sub

Private Sub Txtnpm_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then
Dim JR, PS As String
Txttm = “20” & Left(Txtnpm, 2)
S = Mid(Txtnpm, 3, 1)
If S = “1” Then
JR = “SISTEM INFORMASI”
ElseIf S = “2” Then
JR = “TEHNIK INFORMATIKA”
ElseIf S = “3” Then
JR = “MANAJEMEN INFORMATIKA”
ElseIf S = “4” Then
JR = “KOMPUTER AKUNTANSI”
End If
Txtjr = JR

S = Mid(Txtnpm, 4, 2)
If S = “01” Then
PS = “STRATA SATU”
ElseIf S = “02” Then
PS = “DIPLOMA EMPAT”
ElseIf S = “03” Then
PS = “DIPLOMA TIGA”
ElseIf S = “04” Then
PS = “DIPLOMA DUA”
End If
Txtprodi = PS
Txturut = Right(Txtnpm, 3)
End If
End Sub

Iklan

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 )

Foto Google+

You are commenting using your Google+ 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 )

Connecting to %s