Sintaknya :
Private Sub Timer1_Timer()
txtjam = Time
txttanggal = Format(Date, "dddd,d mmmm yyyy")
If Label1.Enabled = True Then
Label1.Enabled = False
Else
Label1.Enabled = True
End If
End Sub
Private Sub Form_Activate()
cmbkode.SetFocus
End Sub
Private Sub Form_Load()
cmbkode = "--Kode Tiket--"
cmbkode.AddItem "SEN02A"
cmbkode.AddItem "MUT01C"
cmbkode.AddItem "BIM03B"
List1.AddItem "Bandung"
List1.AddItem "Semarang"
List1.AddItem "Surabaya"
End Sub
Private Sub cmbkode_Click()
If Left(cmbkode.Text, 3) = "SEN" Then
txtnama = "Senja Utama"
ElseIf Left(cmbkode.Text, 4) = "MUT" Then
txtnama = "Mutiara Timur"
Else
txtnama = "Bima Kencana"
End If
If Mid(cmbkode.Text, 4, 2) = "01" Then
txthari.Text = "Senin"
ElseIf Mid(cmbkode.Text, 4, 2) = "02" Then
txthari.Text = "Selasa"
Else
txthari.Text = "Rabu"
End If
If Right(cmbkode.Text, 1) = "A" Then
txtwaktu.Text = "09.00"
ElseIf Right(cmbkode.Text, 1) = "B" Then
txtwaktu.Text = "13.00"
Else
txtwaktu.Text = "19.00"
End If
End Sub
Private Sub cmdhitung_Click()
txttobay = txtharga * Val(txtjumbel)
txtubay.SetFocus
End Sub
Private Sub Option1_Click()
If List1 = "Bandung" Then
txtharga = 300000
ElseIf List1 = "Semarang" Then
txtharga = 350000
Else
txtharga = 400000
End If
End Sub
Private Sub Option2_Click()
If List1 = "Bandung" Then
txtharga = 100000
ElseIf List1 = "Semarang" Then
txtharga = 150000
Else
txtharga = 200000
End If
End Sub
Private Sub Option3_Click()
If List1 = "Bandung" Then
txtharga = 200000
ElseIf List1 = "Semarang" Then
txtharga = 250000
Else
txtharga = 300000
End If
End Sub
Private Sub txtjumbel_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then
cmdhitung.SetFocus
End If
End Sub
Private Sub txtubay_Change()
txtukem = Val(txtubay) - Val(txttobay)
End Sub
Private Sub cmdbersih_Click()
cmbkode = "--Kode Tiket--"
txtnama = " "
List1.Text = " "
Option1.Value = False
Option2.Value = False
Option3.Value = False
txtharga.Text = " "
txtjumbel.Text = " "
txthari = " "
txtwaktu = " "
txttobay = " "
txtubay = " "
txtukem = " "
End Sub
Private Sub cmdexit_Click()
X = MsgBox("Do U Wanna Quit...?", vbQuestion + vbOKCancel, "Konfirmasi")
If X = vbOK Then
Unload Me
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 :