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

How to add label caption to listview

$
0
0
Hello

i am newbie in vb6 i have a problem kindly solve my problem
i have a listview and a label
3rd column of listview have numeric data
i use label to show the sum of values from listview 3rd column.
but i wantto add label caption in the last row of listview how can i do that

here is my code
Code:

Private Sub Command2_Click()
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
LblTotal.Caption = "Total : Rs. " & lngtot
End Sub

thanks

Viewing all articles
Browse latest Browse all 21986

Trending Articles



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