Quantcast
Channel: VBForums
Viewing all articles
Browse latest Browse all 15246

list1 how to sum the 5 column

$
0
0
Hi, I'm ontro

I can't sum the 5 column of list1


I have the code in excel that does it well
How would the code be in vb 6.0, thanks


the code in excel is the following


Code:


Dim I As Integer
Dim Sum As Double

Sum = 0
    For I = 0 To ListBox1.ListCount - 1
   
        Sum = Sum + ListBox1.List(I, 4)'Column 5

    Next I
            TextBox2.Text = Sum


how would the code be in vb 6.0

Thank you

Viewing all articles
Browse latest Browse all 15246

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>