LATIHAN

untitled

Private Sub cmdbatal_Click()
txtnama.SetFocus
txtnama.Text = “”
txtnpm.Text = “”
txtjurusan.Text = “”
txtstudy.Text = “”
txttahun.Text = “”
txturut.Text = “”
End Sub

Private Sub cmdkeluar_Click()
End
End Sub

Private Sub cmdlagi_Click()
txtnama.SetFocus
txtnama.Text = “”
txtnpm.Text = “”
txtjurusan.Text = “”
txtstudy.Text = “”
txttahun.Text = “”
txturut.Text = “”
End Sub

Private Sub cmdproses_Click()
Dim N As String
txttahun.Text = “20” & Left(txtnpm.Text, 2)
N = Mid(txtnpm.Text, 3, 1)
If N = “1” Then
txtjurusan = “Sistem Informasi”
ElseIf N = “2” Then
txtjurusan = “Manajemen Informatika”
ElseIf N = “3” Then
txtjurusan = “Teknik Informatika”
ElseIf N = “4” Then
txtjurusan = “Komputer Akuntansi”
End If
N = Mid(txtnpm.Text, 4, 2)
If N = “01” Then
txtstudy = “Strata Satu”
ElseIf N = “02” Then
txtstudy = “Diploma Empat”
ElseIf N = “03” Then
txtstudy = “Diploma Tiga”
ElseIf N = “04” Then
txtstudy = “Diploma Dua”
End If
txturut.Text = Right(txtnpm.Text, 3)
End Sub
Private Sub txtnama_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then
txtnpm.SetFocus
End If
End Sub

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s