Private Sub Combo1_click()
If Combo1.Text = "Golongan I" Then
List1.AddItem "1a"
List1.AddItem "1b"
List1.AddItem "1c"
List1.AddItem "1d"
ElseIf Combo1.Text = "Golongan II" Then
List1.AddItem "2a"
List1.AddItem "2b"
List1.AddItem "2c"
List1.AddItem "2d"
ElseIf Combo1.Text = "Golongan III" Then
List1.AddItem "3a"
List1.AddItem "3b"
List1.AddItem "3c"
List1.AddItem "3d"
Else
List1.AddItem "4a"
List1.AddItem "4b"
List1.AddItem "4c"
List1.AddItem "4d"
End If
End Sub
Private Sub Command1_Click()
gapok.Text = ""
Text1.Text = ""
trans.Text = ""
tj.Text = ""
tg.Text = ""
Combo1.Text = "Combo1"
List1.Clear
End Sub
Private Sub Command2_Click()
End
End Sub
Private Sub Form_Load()
Combo1.AddItem "Golongan I"
Combo1.AddItem "Golongan II"
Combo1.AddItem "Golongan III"
Combo1.AddItem "Golongan IV"
End Sub
Private Sub List1_Click()
If List1.Text = "1a" Then
gapok.Text = 1300000
ElseIf List1.Text = "1b" Then
gapok.Text = 1400000
ElseIf List1.Text = "1c" Then
gapok.Text = 1500000
ElseIf List1.Text = "1d" Then
gapok.Text = 1600000
ElseIf List1.Text = "2a" Then
gapok.Text = 2100000
ElseIf List1.Text = "2b" Then
gapok.Text = 2200000
ElseIf List1.Text = "2c" Then
gapok.Text = 2300000
ElseIf List1.Text = "2d" Then
gapok.Text = 2400000
ElseIf List1.Text = "3a" Then
gapok.Text = 3000000
ElseIf List1.Text = "3b" Then
gapok.Text = 3100000
ElseIf List1.Text = "3c" Then
gapok.Text = 3200000
ElseIf List1.Text = "3d" Then
gapok.Text = 3300000
ElseIf List1.Text = "4a" Then
gapok.Text = 4000000
ElseIf List1.Text = "4b" Then
gapok.Text = 4100000
ElseIf List1.Text = "4c" Then
gapok.Text = 4200000
ElseIf List1.Text = "4d" Then
gapok.Text = 4300000
End If
trans.Text = Val(gapok.Text) * (40 / 100)
If Left(List1.Text, 1) = 1 Then
tj.Text = 500000
ElseIf Left(List1.Text, 1) = 2 Then
tj.Text = 700000
ElseIf Left(List1.Text, 1) = 3 Then
tj.Text = 900000
Else
tj.Text = 1200000
End If
tg.Text = Val(gapok) + Val(trans) + Val(tj)
End Sub
If Combo1.Text = "Golongan I" Then
List1.AddItem "1a"
List1.AddItem "1b"
List1.AddItem "1c"
List1.AddItem "1d"
ElseIf Combo1.Text = "Golongan II" Then
List1.AddItem "2a"
List1.AddItem "2b"
List1.AddItem "2c"
List1.AddItem "2d"
ElseIf Combo1.Text = "Golongan III" Then
List1.AddItem "3a"
List1.AddItem "3b"
List1.AddItem "3c"
List1.AddItem "3d"
Else
List1.AddItem "4a"
List1.AddItem "4b"
List1.AddItem "4c"
List1.AddItem "4d"
End If
End Sub
Private Sub Command1_Click()
gapok.Text = ""
Text1.Text = ""
trans.Text = ""
tj.Text = ""
tg.Text = ""
Combo1.Text = "Combo1"
List1.Clear
End Sub
Private Sub Command2_Click()
End
End Sub
Private Sub Form_Load()
Combo1.AddItem "Golongan I"
Combo1.AddItem "Golongan II"
Combo1.AddItem "Golongan III"
Combo1.AddItem "Golongan IV"
End Sub
Private Sub List1_Click()
If List1.Text = "1a" Then
gapok.Text = 1300000
ElseIf List1.Text = "1b" Then
gapok.Text = 1400000
ElseIf List1.Text = "1c" Then
gapok.Text = 1500000
ElseIf List1.Text = "1d" Then
gapok.Text = 1600000
ElseIf List1.Text = "2a" Then
gapok.Text = 2100000
ElseIf List1.Text = "2b" Then
gapok.Text = 2200000
ElseIf List1.Text = "2c" Then
gapok.Text = 2300000
ElseIf List1.Text = "2d" Then
gapok.Text = 2400000
ElseIf List1.Text = "3a" Then
gapok.Text = 3000000
ElseIf List1.Text = "3b" Then
gapok.Text = 3100000
ElseIf List1.Text = "3c" Then
gapok.Text = 3200000
ElseIf List1.Text = "3d" Then
gapok.Text = 3300000
ElseIf List1.Text = "4a" Then
gapok.Text = 4000000
ElseIf List1.Text = "4b" Then
gapok.Text = 4100000
ElseIf List1.Text = "4c" Then
gapok.Text = 4200000
ElseIf List1.Text = "4d" Then
gapok.Text = 4300000
End If
trans.Text = Val(gapok.Text) * (40 / 100)
If Left(List1.Text, 1) = 1 Then
tj.Text = 500000
ElseIf Left(List1.Text, 1) = 2 Then
tj.Text = 700000
ElseIf Left(List1.Text, 1) = 3 Then
tj.Text = 900000
Else
tj.Text = 1200000
End If
tg.Text = Val(gapok) + Val(trans) + Val(tj)
End Sub
No comments:
Post a Comment