Re-using Private Integer

H

Hutty

I have three listviews where I am totalling the rows on each listview.
I have declared a variable for each column, "Private col1 as Double =0" etc..

This works fine for Listview1.
The problem is that I do not want to create another variable for col1 of
listview2 and col1 of listview3. I would like to reuse the same variable.
However, when the variable gets to listview2 it has the total from col1 of
listview1 as a starting point and not zero.
Now col1 of listview 2 equals col1 of listview1 plus col1 of listview2.
If I try to clear col1 by resetting to zero, then col1 for all three
listviews equals the last row of col1 in each listview, instead of totalling
all rows.

I am calling a Public Sub from the listview_itemdatabound event to populate
listviews.

Any ideas on how to get this to work without using 3 variables for the same
use?

Thanks
 
H

Hutty

I have moved the code to reset in various locations, but have not gotten it
to work fully as expected. I will continue to explore. Thanks for the input.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top