Quantcast
Channel: VBForums - Visual Basic 6 and Earlier
Viewing all articles
Browse latest Browse all 21839

Error Index out of bound

$
0
0
Hello friends i am using this code to show the sum of 3rd column of a listview in last row.code works fine but i got an error

Run Time error 35600
Index out of bound
here is my code
plz help
Code:

Dim lngindex As Long
    Dim lngtot As Long
   
If Rs.State = 1 Then Rs.Close
    Rs.Open "select * from Expenses where ExpDate between #" & DTPicker2.Value & "# and #" & DTPicker3.Value & "#", GConn, 3, 4
   
  Call FillListView(ListView1, Rs, 5, 1, False, False)

For lngindex = 1 To ListView1.ListItems.Count
lngtot = lngtot + ListView1.ListItems(lngindex).SubItems(3)

Next
Dim lvi As ListItem
Set lvi = ListView1.ListItems.Add(, , "Total : Rs. ")
lvi.SubItems(3) = CStr(lngtot)


Viewing all articles
Browse latest Browse all 21839

Trending Articles



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