cara menggunakan kode Penjumlahan pada listbox
Private Sub totalharga()
Dim i As Integer
Dim harga As Long
harga = 0
For i = 0 To ListBox1.ListCount - 1
harga = harga + Val(ListBox1.List(i, 2))
Next
Me.txtotal.Text = harga
End Sub
Penjumlahan list box2
Sub hitung ()
With listbox1
Me.TxtTotal=0
For i =1 to. ListCount - 1
Me.TxtTotal = csng (me.txtTotal) + csng (. List (i, 4))
Next
End with
End sub
Sub hitung ()
With listbox1
Me.TxtTotal=0
For i =1 to. ListCount - 1
Me.TxtTotal = csng (me.txtTotal) + csng (. List (i, 4))
Next
End with
End sub
Tidak ada komentar:
Posting Komentar