Posted on

TUGAS 3 VB1

Gambar

Private Sub cmdbatal_Click()
txtnama.SetFocus
txtnama = “”
txtnpm = “”
Txtjr = “”
Txtps = “”
Txttahun = “”
Txturut = “”
End Sub

Private Sub cmdkeluar_Click()
End
End Sub

Private Sub Cmdlagi_Click()
txtnama.SetFocus
txtnama = “”
txtnpm = “”
Txtjr = “”
Txtps = “”
Txttahun = “”
Txturut = “”
End Sub

Private Sub Cmdproses_Click()
Dim a, jr, ps As String
Txttahun.Text = “20” & Left(txtnpm.Text, 2)
a = Mid(txtnpm.Text, 3, 1)
If a = “1” Then
jr = “sistem informasi”
ElseIf a = “2” Then
jr = “manajemen informatika”
ElseIf a = “3” Then
jr = “tekhnik informatika”
ElseIf a = “4” Then
jr = “komputer akuntansi”
End If
Txtjr.Text = jr
a = Mid(txtnpm.Text, 4, 2)
If a = “00” Then
ps = “strata satu”
ElseIf a = “01” Then
ps = “diploma empat”
ElseIf a = “02” Then
ps = “diploma tiga”
ElseIf a = “03” Then
ps = “diploma dua”
End If
Txtps.Text = ps
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