Kamis, 19 April 2012


kalo yang ini tetang salon.....
gaya dikit ok!!



Private Sub aktif()
tnama.Enabled = True
c1.Enabled = True
c2.Enabled = True
c3.Enabled = True
c4.Enabled = True
opt1.Enabled = True
opt2.Enabled = True
cmbk.Enabled = True
tubay.Enabled = True

End Sub

Private Sub nonaktif()
tnama.Enabled = False
c1.Enabled = False
c2.Enabled = False
c3.Enabled = False
c4.Enabled = False
opt1.Enabled = False
opt2.Enabled = False
cmbk.Enabled = False
tubay.Enabled = False
ttgl.Enabled = False
twkt.Enabled = False
th1.Enabled = False
th2.Enabled = False
th3.Enabled = False
th4.Enabled = False
th5.Enabled = False
tnk.Enabled = False
ttobay.Enabled = False
tukem.Enabled = False

End Sub

Private Sub bersih()
tnama.Text = ""
c1.Value = 0
c2.Value = 0
c3.Value = 0
c4.Value = 0
opt1.Value = 0
opt2.Value = 0
cmbk.Text = ""
tubay.Text = ""
th1.Text = ""
th2.Text = ""
th3.Text = ""
th4.Text = ""
th5.Text = ""
tnk.Text = ""
ttobay.Text = ""
tukem.Text = ""
End Sub

Private Sub c1_Click()
If c1.Value = 1 Then
th1.Text = 75000
Else
th1.Text = 0
End If
End Sub

Private Sub c2_Click()
If c2.Value = 1 Then
th2.Text = 65000
Else
th2.Text = 0
End If
End Sub

Private Sub c3_Click()
If c3.Value = 1 Then
th3.Text = 55000
Else
th3.Text = 0
End If
End Sub

Private Sub c4_Click()
If c4.Value = 1 Then
th41.Text = 45000
Else
th4.Text = 0
End If
End Sub

Private Sub cmbk_Click()
If cmbk.Text = "A001" Then
tnk.Text = "Heni"
ElseIf cmbk.Text = "A002" Then
tnk.Text = "Shinta"
Else
tnk.Text = "Nova"
End If
End Sub

Private Sub cmddata_Click()
bersih
aktif
tnama.SetFocus
cmbk.Text = "-Pilih-"
cmddata.Enabled = False
cmdhitung.Enabled = True
cmdkeluar.Enabled = True

End Sub

Private Sub cmdhitung_Click()
ttobay.Text = Val(th1.Text) + Val(th2.Text) + Val(th3.Text) + Val(th4.Text) + Val(th5.Text)
tubay.SetFocus
cmddata.Enabled = True
cmdhitung.Enabled = False
cmdkeluar.Enabled = True

End Sub

Private Sub cmdkeluar_Click()
X = MsgBox("Tutup Form?", vbYesNo + vbQuestion, "Konfirmasi")
If X = vbYes Then
Unload Me
End If

End Sub

Private Sub Form_Activate()
bersih
nonaktif
cmbk.AddItem "A001"
cmbk.AddItem "A002"
cmbk.AddItem "A003"
ttgl.Text = Date
twkt.Text = Time
cmddata.Enabled = True
cmdhitung.Enabled = False
cmdkeluar.Enabled = True

End Sub

Private Sub opt1_Click()
If opt1.Value = True Then
th5.Text = 100000
End If
End Sub

Private Sub opt2_Click()
If opt2.Value = True Then
th5.Text = 200000
End If
End Sub


Private Sub tubay_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then
    If Val(tubay.Text) < Val(ttobay.Text) Then
    MsgBox "Maaf Uang Bayar Kurang Rp. " & (Val(ttobay.Text) - Val(tubay.Text)) & "," & "Silahkan Input Kembali", vbOKOnly + vbInformation, "Informasi"
tubay.Text = ""
tubay.SetFocus
ttukembali = ""
Else
tukem.Text = Val(tubay.Text) - Val(ttobay.Text)
End If
End If
End Sub


















Rabu, 18 April 2012

tugas uts

 Narasi :
Duh....kita tuh gy jalan-jalan tapi apa daya dan upaya kalau ngantuk sudah mendera.... saudara tak ada, temen juga belom kenalan,jadi pake acara nginep di hotel deh...
pas nengok gini programnya


Sabar ya.... Listingnya agak banyak dan ribet........

Sub aktif()
txtnama.Enabled = True
cmbkode.Enabled = True
opts.Enabled = True
optd.Enabled = True
optf.Enabled = True
txthrg.Enabled = True
txtlama.Enabled = True
txtubay.Enabled = True
End Sub

Sub bersih()
txtnama.Text = ""
cmbkode.Text = ""
txtjenis.Text = ""
opts.Value = 0
optd.Value = 0
optf.Value = 0
txthrg.Text = ""
txtlama.Text = ""
txttohar.Text = ""
txtubay.Text = ""
txtukem.Text = ""
End Sub

Sub nonaktif()
txtnama.Enabled = False
txttgl.Enabled = False
cmbkode.Enabled = False
txtjenis.Text = False
opts.Enabled = False
optd.Enabled = False
optf.Enabled = False
txthrg.Enabled = False
txtlama.Enabled = False
txttohar.Enabled = False
txtubay.Enabled = False
txtukem.Enabled = False
End Sub

Private Sub cmbkode_Click()
If cmbkode.Text = "SU01" Then
txtjenis.Text = "Suite"
ElseIf cmbkode.Text = "BS01" Then
txtjenis.Text = "Business"
Else
txtjenis.Text = "Presiden"
End If
End Sub

Private Sub cmdisi_Click()
bersih
aktif
cmbkode.Text = "--PILIH--"
txtnama.SetFocus
End Sub

Private Sub cmdkeluar_Click()
x = MsgBox("Tutup Form ?", vbYesNo + vbQuestion, "Konfirmasi")
If x = vbYes Then
Unload Me
End If
End Sub

Private Sub Form_Activate()
bersih
aktif
txttgl.Text = Date
cmbkode.AddItem "SU01"
cmbkode.AddItem "BS01"
cmbkode.AddItem "PR01"
cmdisi.Enabled = True
cmdkeluar.Enabled = True
End Sub

Private Sub optd_Click()
If optd.Value = True Then
    If txtjenis.Text = "Suite" Then
    txthrg.Text = 400000
    ElseIf txtjenis.Text = "Business" Then
    txthrg.Text = 600000
    Else
    txthrg.Text = 900000
    End If
Else
txthrg.Text = 0
End If
txtnama.SetFocus
End Sub

Private Sub optf_Click()
If optf.Value = True Then
    If txtjenis.Text = "Suite" Then
    txthrg.Text = 500000
    ElseIf txtjenis.Text = "Business" Then
    txthrg.Text = 700000
    Else
    txthrg.Text = 1000000
    End If
Else
txthrg.Text = 0
End If
txtnama.SetFocus
End Sub

Private Sub opts_Click()
If opts.Value = True Then
    If txtjenis.Text = "Suite" Then
    txthrg.Text = 300000
    ElseIf txtjenis.Text = "Business" Then
    txthrg.Text = 500000
    Else
    txthrg.Text = 800000
    End If
Else
txthrg.Text = 0
End If
txtnama.SetFocus
End Sub

Private Sub txtlama_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then
txttohar.Text = Val(txthrg.Text) * Val(txtlama.Text)
txtubay.SetFocus
End If
End Sub

Private Sub txtubay_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then
x = Val(txttohar.Text) - Val(txtubay.Text)
If txtubay.Text < txttohar.Text Then
MsgBox "Uang Anda Kurang" & a, vbOKOnly, "Warning!"
txtubay.Text = ""
txtubay.SetFocus
Else
txtukem.Text = (Val(txtubay.Text) - Val(txttohar.Text))
End If
End If
End Sub



nah..... nih dia tampilannya.... selesai deh..........


dah cape ah..... Slamet Tidur................

kalo ini mah perhitungan gaji...


Sub aktif()
txtnip.Enabled = True
txtnama.Enabled = True
cmbgol.Enabled = True
opt1.Enabled = True
opt2.Enabled = True
opt3.Enabled = True
End Sub

Sub nonaktif()
txtnip.Enabled = False
txtnama.Enabled = False
cmbgol.Enabled = False
txttgl.Enabled = False
txtjab.Enabled = False
txtgapok.Enabled = False
txttunjab.Enabled = False
txttrans.Enabled = False
opt1.Enabled = False
opt2.Enabled = False
opt3.Enabled = False
txtstatus.Enabled = False
txtgakot.Enabled = False
txtpph.Enabled = False
txtgaber.Enabled = False
End Sub

Sub bersih()
txtnip.Text = ""
txtnama.Text = ""
cmbgol.Text = ""
txtjab.Text = ""
txtgapok.Text = ""
opt1.Value = 0
opt2.Value = 0
opt3.Value = 0
End Sub

Private Sub cmbgol_Click()
If cmbgol.Text = "I" Then
txtjab.Text = "Pantry"
txtgapok.Text = "1000000"
txttunjab.Text = "200000"
txttrans.Text = "0"
ElseIf cmbgol.Text = "II" Then
txtjab.Text = "Staff"
txtgapok.Text = "1750000"
txttunjab.Text = "300000"
txttrans.Text = "200000"
ElseIf cmbgol.Text = "III" Then
txtjab.Text = "Supervisor"
txtgapok.Text = "2250000"
txttunjab.Text = "500000"
txttrans.Text = "300000"
ElseIf cmbgol.Text = "IV" Then
txtjab.Text = "Manajer"
txtgapok.Text = "5000000"
txttunjab.Text = "700000"
txttrans.Text = "500000"
Else
txtgapok.Text = "10000000"
txttunjab.Text = "1000000"
txttrans.Text = "1000000"
End If
End Sub

Private Sub cmdhitung_Click()
bersih
aktif
txtnip.SetFocus
txtnip.Text = 0
cmdhitung.Enabled = False
cmdkeluar.Enabled = True
End Sub

Private Sub cmdkeluar_Click()
X = MsgBox("Tutup From?", vbYesNo + vbQuestion, "Konfirmasi")
If X = vbYes Then
Unload Me
End If
End Sub

Private Sub Form_Activate()
bersih
nonaktif
cmbgol.AddItem "I"
cmbgol.AddItem "II"
cmbgol.AddItem "III"
cmbgol.AddItem "IV"
cmbgol.AddItem "V"
txttgl = Date
cmdhitung.Enabled = True
cmdkeluar.Enabled = True
End Sub

Private Sub opt1_Click()
If opt1.Value = True Then
txtstatus.Text = 300000
txtgakot.Text = Val(txtgapok.Text) + Val(txtjab.Text) + Val(txttrans.Text) + Val(txtstatus.Text)
txtpph.Text = 0.1 * Val(txtgakot.Text)
txtgaber.Text = Val(txtgakot.Text) - Val(txtpph.Text)
cmdhitung.Enabled = True
End If
End Sub

Private Sub opt2_Click()
If opt2.Value = True Then
txtstatus.Text = 0
txtgakot.Text = Val(txtgapok.Text) + Val(txtjab.Text) + Val(txttrans.Text) + Val(txtstatus.Text)
txtpph.Text = 0.1 * Val(txtgakot.Text)
txtgaber.Text = Val(txtgakot.Text) - Val(txtpph.Text)
cmdhitung.Enabled = True
End If
End Sub

Private Sub opt3_Click()
If opt3.Value = True Then
txtstatus.Text = 100000
txtgakot.Text = Val(txtgapok.Text) + Val(txtjab.Text) + Val(txttrans.Text) + Val(txtstatus.Text)
txtpph.Text = 0.1 * Val(txtgakot.Text)
txtgaber.Text = Val(txtgakot.Text) - Val(txtpph.Text)
cmdhitung.Enabled = True
End If
End Sub

Private Sub txtnama_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then
cmbgol.SetFocus
End If

End Sub

Private Sub txtnip_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then
txtnama.SetFocus
End If
End Sub