tugas VB 1
Private Sub Command1_Click()
Dim S As String
S = Mid(Text2.Text, 3, 1)
If S = “1” Then
Text3.Text = “sistem informasi”
ElseIf S = “2” Then
Text3.Text = “teknik komputer”
ElseIf S = “3” Then
Text3.Text = “teknik informatika”
ElseIf S = “4” Then
Text3.Text = “manajemen komputer”
End If
S = Mid(Text2.Text, 3, 1)
If S = “1” Then
Text4.Text = “strata satu”
ElseIf S = “2” Then
Text4.Text = “diplomad tiga”
ElseIf S = “3” Then
Text4.Text = “diplomad empat”
ElseIf S = “4” Then
Text4.Text = “diplomad satu”
End If
S = Left(Text2.Text, 2)
If S = “12” Then
Text5.Text = “2012”
ElseIf S = “11” Then
Text5.Text = “2011”
ElseIf S = “10” Then
Text5.Text = “2010”
ElseIf S = “09” Then
Text5.Text = “2009”
End If
S = Mid(Text2.Text, 3, 1)
If S = “1” Then
Text7.Text = “2500000”
ElseIf S = “2” Then
Text7Text = “2000000”
ElseIf S = “3” Then
Text7.Text = “2250000”
ElseIf S = “4” Then
Text7.Text = “1500000”
End If
Text6.Text = Right(Text2.Text, 3)
End Sub
Private Sub Command2_Click()
Text1.SetFocus
Text1.Text = “”
Text2.Text = “”
Text3.Text = “”
Text4.Text = “”
Text5.Text = “”
Text6.Text = “”
Text7.Text = “”
End Sub
Private Sub Command3_Click()
Text1.SetFocus
Text1.Text = “”
Text2.Text = “”
Text3.Text = “”
Text4.Text = “”
Text5.Text = “”
Text6.Text = “”
Text7.Text = “”
End Sub
Private Sub Command4_Click()
Unload Me
End Sub
Private Sub Text1_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then
Text2.SetFocus
End If
End Sub