Sintaknya :
Sub nonaktif()
txtnopes.Enabled = False
cmbkopet.Enabled = False
txtnapet.Enabled = False
List1.Enabled = False
txttujuan.Enabled = False
Option1.Enabled = False
Option2.Enabled = False
Option3.Enabled = False
txtharga.Enabled = False
txtppn.Enabled = False
txtjumbay.Enabled = False
txtubay.Enabled = False
txtukem.Enabled = False
End Sub
Sub aktif()
txtnopes.Enabled = True
cmbkopet.Enabled = True
txtnapet.Enabled = True
List1.Enabled = True
txttujuan.Enabled = True
Option1.Enabled = True
Option2.Enabled = True
Option3.Enabled = True
txtharga.Enabled = True
txtppn.Enabled = True
txtjumbay.Enabled = True
txtubay.Enabled = True
txtukem.Enabled = True
End Sub
Private Sub Form_Activate()
nonaktif
cmbkopet.Text = "--Kode Petugas--"
txttanggal.Text = Now
cmbkopet.AddItem "PTG001"
cmbkopet.AddItem "PTG002"
cmbkopet.AddItem "PTG003"
List1.AddItem "JW001"
List1.AddItem "BL002"
List1.AddItem "BN001"
cmdbersih.SetFocus
End Sub
Private Sub txtnopes_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then
aktif
End If
txtnopes.SetFocus
End Sub
Private Sub Timer1_Timer()
tanggal.Caption = Format(Date, "dddd,d mmmm yyyy")
waktu.Caption = Format(Time, "hh:mm:ss")
End Sub
Private Sub cmbkopet_Click()
If cmbkopet.Text = "PTG001" Then
txtnapet.Text = "ANDIKA"
ElseIf cmbkopet.Text = "PTG002" Then
txtnapet.Text = "BIMA"
Else
txtnapet.Text = "DENI"
End If
End Sub
Private Sub List1_Click()
If List1.Text = "JW001" Then
txttujuan = "Jakarta - Yogjakarta"
ElseIf List1.Text = "BL002" Then
txttujuan = "Jakarta - Bali"
Else
txttujuan = "Jakarta - Bunaken"
End If
End Sub
Private Sub Option1_Click()
If txttujuan.Text = "Jakarta - Yogjakarta" Then
txtharga.Text = 5000000
ElseIf txttujuan.Text = "Jakarta - Bali" Then
txtharga.Text = 4500000
Else
txtharga.Text = 7500000
End If
cmdhitung.SetFocus
End Sub
Private Sub Option2_Click()
If txttujuan.Text = "Jakarta - Yogjakarta" Then
txtharga.Text = 2500000
ElseIf txttujuan.Text = "Jakarta - Bali" Then
txtharga.Text = 3000000
Else
txtharga.Text = 5000000
End If
cmdhitung.SetFocus
End Sub
Private Sub Option3_Click()
If txttujuan.Text = "Jakarta - Yogjakarta" Then
txtharga.Text = 7000000
ElseIf txttujuan.Text = "Jakarta - Bali" Then
txtharga.Text = 8000000
Else
txtharga.Text = 10000000
End If
cmdhitung.SetFocus
End Sub
Private Sub cmdhitung_Click()
txtppn.Text = 0.1 * Val(txtharga.Text)
txtjumbay.Text = Val(txtharga.Text) - Val(txtppn.Text)
txtubay.SetFocus
End Sub
Private Sub txtubay_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then
txtukem.Text = Val(txtubay.Text) - Val(txtjumbay.Text)
nonaktif
End If
End Sub
Private Sub cmdbersih_Click()
aktif
cmbkopet.Text = "--Kode Petugas--"
txttanggal.Text = Now()
txtnopes.Text = " "
txtnapet.Text = " "
List1.ListIndex = -1
txttujuan.Text = " "
Option1.Value = False
Option2.Value = False
Option3.Value = False
txtharga.Text = " "
txtppn.Text = " "
txtjumbay.Text = " "
txtubay.Text = " "
txtukem.Text = " "
txtnopes.SetFocus
End Sub
Private Sub cmdkeluar_Click()
X = MsgBox("Are Your Sure To Exit?", vbQuestion + vbYesNoCancel, "Konfrimasi")
If X = vbYes Then
End
End If
End Sub
Update Contact :
No Wa/Telepon (puat) : 085267792168
No Wa/Telepon (fajar) : 085369237896
Email : Fajarudinsidik@gmail.com
No Wa/Telepon (puat) : 085267792168
No Wa/Telepon (fajar) : 085369237896
Email: Fajarudinsidik@gmail.com
atau Kirimkan Private messanger melalui email dengan klik tombol order dibawah ini :