Script nya :
Private Sub Combo1_Change()
If Combo1.Text = "BELUM KAWIN" Then
Text2.Enabled = False
Text2.Text = 0
Else
Text2.Enabled = True
Text2.Text = ""
Text2.SetFocus
End If
End Sub
Private Sub Command1_Click()
Text1.Text = Clear
Text2.Text = Clear
Combo1.ListIndex = -1
Combo2.ListIndex = -1
Text3.Text = Clear
Text4.Text = Clear
Text5.Text = Clear
Text1.SetFocus
End Sub
Private Sub Command2_Click()
Select Case Combo1.Text
Case "BELUM KAWIN"
TUNJANGAN_ANAK = 0
Case "KAWIN"
TUNJANGAN_ANAK = Text2.Text * 10000
Case "DUDA"
TUNJANGAN_ANAK = Text2.Text * 20000
Case "JANDA"
TUNJANGAN_ANAK = Text2.Text * 30000
End Select
Text4.Text = "Rp." & TUNJANGAN_ANAK
Select Case Combo2.Text
Case "A"
GAJI_POKOK = 2500000
Case "B"
GAJI_POKOK = 2000000
Case "C"
GAJI_POKOK = 1500000
Case "D"
GAJI_POKOK = 1000000
End Select
Text6.Text = BONUS_KERJA
Select Case Combo3.Text
Case Is > 5
BONUS_KERJA = 200000
Text6.Text = "Rp." & BONUS_KERJA
Case Is < 5
BONUS_KERJA = 100000
Text6.Text = "Rp." & BONUS_KERJA
End Select
Text3.Text = "Rp." & GAJI_POKOK
TOTAL = TUNJANGAN_ANAK + GAJI_POKOK + BONUS_KERJA
Text5.Text = "Rp." & TOTAL
Text1.SetFocus
End Sub
Private Sub Command3_Click()
Unload Me
End Sub
Private Sub Form_Load()
Text1.Text = Clear
Text2.Text = Clear
Combo1.ListIndex = -1
Combo2.ListIndex = -1
Text3.Text = Clear
Text4.Text = Clear
Text5.Text = Clear
Combo1.AddItem "BELUM KAWIN"
Combo1.AddItem "KAWIN"
Combo1.AddItem "DUDA"
Combo1.AddItem "JANDA"
Combo2.AddItem "A"
Combo2.AddItem "B"
Combo2.AddItem "C"
Combo2.AddItem "D"
Combo3.AddItem "6 TH"
Combo3.AddItem "5 TH"
Combo3.AddItem "4 TH"
Combo3.AddItem "3 TH"
Combo3.AddItem "2 TH"
Combo3.AddItem "1 TH"
End Sub
Sebagian ilmu didapat pada om google.dan para masta...dunke !!!
If Combo1.Text = "BELUM KAWIN" Then
Text2.Enabled = False
Text2.Text = 0
Else
Text2.Enabled = True
Text2.Text = ""
Text2.SetFocus
End If
End Sub
Private Sub Command1_Click()
Text1.Text = Clear
Text2.Text = Clear
Combo1.ListIndex = -1
Combo2.ListIndex = -1
Text3.Text = Clear
Text4.Text = Clear
Text5.Text = Clear
Text1.SetFocus
End Sub
Private Sub Command2_Click()
Select Case Combo1.Text
Case "BELUM KAWIN"
TUNJANGAN_ANAK = 0
Case "KAWIN"
TUNJANGAN_ANAK = Text2.Text * 10000
Case "DUDA"
TUNJANGAN_ANAK = Text2.Text * 20000
Case "JANDA"
TUNJANGAN_ANAK = Text2.Text * 30000
End Select
Text4.Text = "Rp." & TUNJANGAN_ANAK
Select Case Combo2.Text
Case "A"
GAJI_POKOK = 2500000
Case "B"
GAJI_POKOK = 2000000
Case "C"
GAJI_POKOK = 1500000
Case "D"
GAJI_POKOK = 1000000
End Select
Text6.Text = BONUS_KERJA
Select Case Combo3.Text
Case Is > 5
BONUS_KERJA = 200000
Text6.Text = "Rp." & BONUS_KERJA
Case Is < 5
BONUS_KERJA = 100000
Text6.Text = "Rp." & BONUS_KERJA
End Select
Text3.Text = "Rp." & GAJI_POKOK
TOTAL = TUNJANGAN_ANAK + GAJI_POKOK + BONUS_KERJA
Text5.Text = "Rp." & TOTAL
Text1.SetFocus
End Sub
Private Sub Command3_Click()
Unload Me
End Sub
Private Sub Form_Load()
Text1.Text = Clear
Text2.Text = Clear
Combo1.ListIndex = -1
Combo2.ListIndex = -1
Text3.Text = Clear
Text4.Text = Clear
Text5.Text = Clear
Combo1.AddItem "BELUM KAWIN"
Combo1.AddItem "KAWIN"
Combo1.AddItem "DUDA"
Combo1.AddItem "JANDA"
Combo2.AddItem "A"
Combo2.AddItem "B"
Combo2.AddItem "C"
Combo2.AddItem "D"
Combo3.AddItem "6 TH"
Combo3.AddItem "5 TH"
Combo3.AddItem "4 TH"
Combo3.AddItem "3 TH"
Combo3.AddItem "2 TH"
Combo3.AddItem "1 TH"
End Sub
Sebagian ilmu didapat pada om google.dan para masta...dunke !!!
No comments:
Post a Comment