Public kdstd As String
Public jstd As String
Public prodi As String
Public Upembangunan As Double
Public usemester As Double
Public kdjstd As String
Public totalhrsbyr As Double
Private Sub Text1_keypress(keyascii As Integer)
If keyascii = 13 Then
Text2.SetFocus
End If
End Sub
Private Sub text2_keypress(keyascii As Integer)
If keyascii = 13 Then
Text3.SetFocus
End If
End Sub
Private Sub text3_change()
kdstd = Text3.Text
If kdstd = “E” Then
jstd = “Diploma 3”
prodi = “M.Informatika”
ElseIf kdstd = “C” Then
jstd = “Strata 1”
prodi = “T.Informatika”
End If
Text4.Text = jstd
Text5.Text = prodi
End Sub
Private Sub option1_click()
If Option1.Value = True Then
If Text3.Text = “E” Then
Upembangunan = 1800000
usemester = 1300000
ElseIf Text3.Text = “C” Then
Upembangunan = 2500000
usemester = 1800000
End If
End If
Text6.Text = Upembangunan
Text7.Text = usemester
totalhrsbyr = Upembangunan + usemester
Text8.Text = totalhrsbyr
End Sub
Private Sub option2_click()
If Option2.Value = True Then
If Text3.Text = “E” Then
Text7.Text = Clear
Text8.Text = Clear
Upembangunan = 2000000
usemester = 150000
ElseIf Text3.Text = “C” Then
Upembangunan = 2800000
usemester = 200000
End If
End If
Text6.Text = Upembangunan
Text7.Text = usemester
totalhrsbyr = Upembangunan + usemester
Text8.Text = totalhrsbyr
End Sub
Private Sub form_load()
Text1 = Clear
Text2 = Clear
Text3 = Clear
Text4 = Clear
Text5 = Clear
Text6 = Clear
Text7 = Clear
Text8 = Clear
Text9 = Clear
Text10 = Clear
Text11 = Clear
Text4.Enabled = False
Text5.Enabled = False
Text10.Enabled = False
Text11.Enabled = False
Text6.Enabled = False
Text7.Enabled = False
Text8.Enabled = False
End Sub
Private Sub command1_click()
Text1 = Clear
Text2 = Clear
Text3 = Clear
Text4 = Clear
Text5 = Clear
Text6 = Clear
Text7 = Clear
Text8 = Clear
Text9 = Clear
Text10 = Clear
Text11 = Clear
Option1 = False
Option2 = False
End Sub
Private Sub command3_click()
End
End Sub
Private Sub command2_click()
If Text9.Text > Text8.Text Then
pesan = MsgBox(“Anda membayar kelebihan!!!”, vbInformation, “Information”)
End If
If Text9.Text < Text8.Text Then
Text11 = “Anda masih ngutang!!”
ElseIf Text9.Text = Text8.Text Then
Text11 = “Anda Lunas!!”
ElseIf Text9.Text > Text8.Text Then
Text11 = “Anda lunas tapi kurangi uang anda ” & Val(Text9.Text) – Val(Text8.Text)
End If
Text10.Text = Text8.Text
End Sub
Private Sub Text9_Change()
If Val(Text9.Text) > Val(Text8.Text) Then
MsgBox “Anda membayar kelebihan!!!”, vbInformation, “Information”
End If
End Sub