kode hitung toko ceria selalu




kode nomor barang
Private Sub cmbnomor_Click()
If cmbnomor.Text = "1" Then
txtnbarang.Text = "sabun"
txtharga.Text = "2000"
ElseIf cmbnomor.Text = "2" Then
txtnbarang.Text = "rinso"
txtharga.Text = "1000"
ElseIf cmbnomor.Text = "3" Then
txtnbarang.Text = "shampo"
txtharga.Text = "3000"
ElseIf cmbnomor.Text = "4" Then
txtnbarang.Text = "pena"
txtharga.Text = "4000"
End If
txtjumlah.SetFocus


End Sub
kode 
Private Sub cmdhitung_Click()
txtbayar.Text = Val(txtharga.Text) * Val(txtjumlah.Text)
End Sub

 kode hitung
Private Sub cmdhitunglagi_Click()
txtnama.Text = " "
cmbnomor.Text = " "
txtnbarang.Text = " "
txtharga.Text = " "
txtjumlah.Text = " "
txtbayar.Text = "  "
txtnama.SetFocus
End Sub

kode keluar
Private Sub cmdselesai_Click()
Unload Me
End Sub

kode selesai
Private Sub Form_Load()
cmbnomor.AddItem "1"
cmbnomor.AddItem "2"
cmbnomor.AddItem "3"
cmbnomor.AddItem "4"
End Sub

Komentar