listview1的subitem(1)中
分别有2
345
67
89
98
123
45
1234
16
....(选项数量是变化的!)
求得到listview1中所有行的subitem(1)中数字相加的总和!

解决方案 »

  1.   

    for i=0 to listview1.items.count -1
      s = s + listview1.items[i].subitem(1)
    next is 就是你想要的
      

  2.   

    楼上的那个for应该改为:
    for i=1 to listview1.items.count-1 '这个集合是从1开始计数的这是我的方法:Private Sub Command1_Click()
        Dim Item As ListItem
        Dim tSum As Long
        For Each Item In ListView1.ListItems      '集合用for each最好不过的了
            tSum = tSum + dd
        Next
        MsgBox tSum
        Set Item = Nothing
    End Sub