lazada.co.id

Wednesday, 6 April 2011

contoh program toko

Posted by ahmad mustaqim | Wednesday, 6 April 2011 | Category: |




Private Sub brsh_Click()
a = MsgBox("yakin mau di bersihkan?", vbOKCancel, "info")
If a = vbOK Then
kobar.Text = "input kode"
nabar.Text = " "
habar.Text = " "
jumbel.Text = " "
pajak.Text = " "
tobar.Text = " "
bonus.Text = " "
kobar.SetFocus
End If
End Sub

Private Sub Form_Load()
kobar.AddItem ("A001")
kobar.AddItem ("A002")
kobar.AddItem ("A003")
kobar.AddItem ("A004")
End Sub


Private Sub habar_Click()
pajak.Text = Val(habar.Text) * 0.1 * Val(jumbel.Text)
tobar.Text = Val(habar.Text) * Val(jumbel.Text) + Val(pajak.Text)
End Sub

Private Sub jumbel_Change()
pajak.Text = Val(habar.Text) * 0.1 * Val(jumbel.Text)
tobar.Text = Val(habar.Text) * Val(jumbel.Text) + Val(pajak.Text)
If tobar.Text > 5000000 Then
bonus.Text = "jam tangan"
Else
If tobar.Text > 3500000 Then
bonus.Text = "jam dinding"
Else
bonus.Text = "tidak dapat bonus"
End If
End If
End Sub

Private Sub klr_Click()
X = MsgBox("yakin mau keluar???", vbOKCancel, "info")
If X = vbOK Then
Unload Me
End If
End Sub

Private Sub kobar_Click()
If kobar.ListIndex = 0 Then
nabar.Text = "mesin cuci"
Else
If kobar.ListIndex = 1 Then
nabar.Text = "kulkas"
Else
If kobar.ListIndex = 2 Then
nabar.Text = "TV"
Else
nabar.Text = "VCD player"
End If
End If
End If
If kobar.ListIndex = 0 Then
habar.Text = 2000000
Else
If kobar.ListIndex = 1 Then
habar.Text = 1750000
Else
If kobar.ListIndex = 2 Then
habar.Text = 1500000
Else
habar.Text = 1000000
End If
End If
End If
End Sub

Private Sub pajak_Click()
tobar.Text = Val(habar.Text) * Val(jumbel.Text) + Val(pajak.Text)
End Sub

Currently have 0 comments:


Leave a Reply

Popular Posts