|
-
Mar 31st, 2001, 09:59 PM
#1
Thread Starter
Fanatic Member
Hi Everyone,
I currently have a ListView control with three columns in it (Subtract, Add, Total). Is what I need to do is this, for every item in the ListView I either need to subtract the amount from the Total or I need to add the amount to the Total. Any ideas on how to do this inside of the ListView control. I would appreicate any help. Thank you.
-
Apr 1st, 2001, 12:11 PM
#2
Hyperactive Member
Hey Ace,
Give this a try... this assumes that you have a value in Total and then either a value in Add or a value in Substract.
Code:
Dim intIndex as Integer
Dim intCount as Integer
'// Assuming lvwListView is your listview control
intCount = lvwListView.ListItems.Count
For intIndex = 1 to intCount
'// Assuming .Text = Total, .SubItems(1) = Add, .SubItems(2) = Substract
With lvwListView.ListItems(intIndex)
.Text = Cstr(Val(.Text) + Val(.SubItems(1)) - Val(.SubItems(2)))
End With
Next
Achichincle
VB6 (VSEE SP5, W2KPro)
ASP
HTML
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|