Senin, 31 Oktober 2011

Program Visual Jakarta Travel Agent

Posted by Unknown On Senin, Oktober 31, 2011 | No comments

Sintaknya :

Sub bersih()
txtnama.Text = " "
txtalamat.Text = " "
cmbkode.Text = "--Pilih Paket--"
txttema.Text = " "
List1.Text = 0
Option1.Value = False
Option2.Value = False
Option3.Value = False
txtharga.Text = " "
txtjumlah.Text = " "
txttotal.Text = " "
txtcash.Text = " "
txtstatus.Text = " "
End Sub

Sub nonaktif()
txtnama.Enabled = False
txtalamat.Enabled = False
cmbkode.Enabled = False
txttema.Enabled = False
List1.Enabled = False
Option1.Enabled = False
Option2.Enabled = False
Option3.Enabled = False
txtharga.Enabled = False
txtjumlah.Enabled = False
txttotal.Enabled = False
txtcash.Enabled = False
txtstatus.Enabled = False
End Sub

Sub aktif()
txtnama.Enabled = True
txtalamat.Enabled = True
cmbkode.Enabled = True
txttema.Enabled = True
List1.Enabled = True
Option1.Enabled = True
Option2.Enabled = True
Option3.Enabled = True
txtharga.Enabled = True
txtjumlah.Enabled = True
txttotal.Enabled = True
txtcash.Enabled = True
txtstatus.Enabled = True
txtnama.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 cmdproses_Click()
aktif
bersih
End Sub

Private Sub Form_Activate()
nonaktif
cmbkode.Text = "--Pilih Paket--"
cmbkode.AddItem "Paket 1"
cmbkode.AddItem "Paket 2"
cmbkode.AddItem "Paket 3"
List1.AddItem "Bandung"
List1.AddItem "Semarang"
List1.AddItem "Surabaya"
End Sub

Private Sub cmbkode_Click()
If cmbkode.Text = "Paket 1" Then
txttema.Text = "Family Holiday"
ElseIf cmbkode.Text = "Paket 2" Then
txttema.Text = "Etnic Holiday"
Else
txttema.Text = "Mount Holiday"
End If
End Sub

Private Sub Option1_Click()
If cmbkode.Text = "Paket 1" Then
If List1.Text = "Bandung" Then
txtharga.Text = 750000
ElseIf List1.Text = "Semarang" Then
txtharga.Text = 750000
ElseIf List1.Text = "Surabaya" Then
txtharga.Text = 850000
End If
ElseIf cmbkode.Text = "Paket 2" Then
If List1.Text = "Bandung" Then
txtharga.Text = 900000
ElseIf List1.Text = "Semarang" Then
txtharga.Text = 350000
ElseIf List1.Text = "Surabaya" Then
txtharga.Text = 500000
End If
ElseIf cmbkode.Text = "Paket 3" Then
If List1.Text = "Bandung" Then
txtharga.Text = 1000000
ElseIf List1.Text = "Semarang" Then
txtharga.Text = 850000
ElseIf List1.Text = "Surabaya" Then
txtharga.Text = 550000
End If
End If
End Sub

Private Sub Option2_Click()
If cmbkode.Text = "Paket 1" Then
If List1.Text = "Bandung" Then
txtharga.Text = 550000
ElseIf List1.Text = "Semarang" Then
txtharga.Text = 650000
ElseIf List1.Text = "Surabaya" Then
txtharga.Text = 750000
End If
ElseIf cmbkode.Text = "Paket 2" Then
If List1.Text = "Bandung" Then
txtharga.Text = 800000
ElseIf List1.Text = "Semarang" Then
txtharga.Text = 250000
ElseIf List1.Text = "Surabaya" Then
txtharga.Text = 400000
End If
ElseIf cmbkode.Text = "Paket 3" Then
If List1.Text = "Bandung" Then
txtharga.Text = 900000
ElseIf List1.Text = "Semarang" Then
txtharga.Text = 750000
ElseIf List1.Text = "Surabaya" Then
txtharga.Text = 450000
End If
End If
End Sub

Private Sub Option3_Click()
If cmbkode.Text = "Paket 1" Then
If List1.Text = "Bandung" Then
txtharga.Text = 600000
ElseIf List1.Text = "Semarang" Then
txtharga.Text = 600000
ElseIf List1.Text = "Surabaya" Then
txtharga.Text = 700000
End If
ElseIf cmbkode.Text = "Paket 2" Then
If List1.Text = "Bandung" Then
txtharga.Text = 650000
ElseIf List1.Text = "Semarang" Then
txtharga.Text = 200000
ElseIf List1.Text = "Surabaya" Then
txtharga.Text = 350000
End If
ElseIf cmbkode.Text = "Paket 3" Then
If List1.Text = "Bandung" Then
txtharga.Text = 850000
ElseIf List1.Text = "Semarang" Then
txtharga.Text = 700000
ElseIf List1.Text = "Surabaya" Then
txtharga.Text = 400000
End If
End If
End Sub

Private Sub txtjumlah_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then
txttotal.Text = Val(txtharga.Text) * Val(txtjumlah.Text)
txtcash.SetFocus
End If
txttotal.Enabled = False
End Sub

Private Sub txtcash_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then
If txtcash = Val(txttotal.Text) Then
txtstatus.Text = "LUNAS"
ElseIf txtcash > Val(txttotal.Text) Then
txtstatus.Text = "Kembali " & "Rp. " & Val(txtcash.Text) - Val(txttotal.Text)
ElseIf txtcash <= Val(txttotal.Text) Then
txtstatus.Text = "Kurang " & "Rp. " & Val(txttotal.Text) - Val(txtcash.Text)
End If
cmdproses.SetFocus
nonaktif
End If
End Sub

Private Sub cmdexit_Click()
X = MsgBox("Are Your Sure To Exit?", vbQuestion + vbYesNoCancel, "INFORMASI")
If X = vbYes Then
End
End If
End Sub

0 komentar:

Posting Komentar

Blog Archive

Blogroll