tugas vb pertemuan 4-1

tugas vb pertemuan 4-1

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

Private Sub cmdbatal_Click()
Txtnama.Text = “”
Txtnpm.Text = “”
Txtjurusan.Text = “”
Txtpstudi.Text = “”
Txttahun.Text = “”
Txtnurut.Text = “”
Txtbp.Text = “”
Txtnama.SetFocus

End Sub

Private Sub cmdhapus_Click()
Txtnama.Text = “”
Txtnpm.Text = “”
Txtjurusan.Text = “”
Txtpstudi.Text = “”
Txttahun.Text = “”
Txtnurut.Text = “”
Txtbp.Text = “”
Txtnama.SetFocus
End Sub

Private Sub cmdproses_Click()
Dim S As String
Txttahun.Text = “20” & Left(Txtnpm.Text, 2)
S = Mid(Txtnpm.Text, 3, 1)
If S = “1” Then
Txtjurusan.Text = “Sistem informasi”
ElseIf S = “2” Then
Txtjurusan.Text = “Tehnik Informatika”
ElseIf S = “3” Then
Txtjurusan.Text = “Manajemen Informatika”
ElseIf S = “4” Then
Txtjurusan.Text = “Manajemen & kom. Akuntansi”
End If

S = Mid(Txtnpm.Text, 4, 2)
If S = “01” Then
Txtpstudi.Text = “Strata Satu”
Txtbp.Text = “1.950.000”
ElseIf S = “02” Then
Txtpstudi.Text = “Diploma Empat”
Txtbp.Text = “1.750.000”
ElseIf S = “03” Then
Txtpstudi.Text = “Diploma Tiga”
Txtbp.Text = “1.650.000”
ElseIf S = “04” Then
Txtpstudi.Text = “Diploma Dua”
Txtbp.Text = “1.450.000”
End If
Txtnurut.Text = Right(Txtnpm.Text, 3)

End Sub

Advertisements

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 )

Google+ photo

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

w

Connecting to %s

%d bloggers like this: