title: How to I add the total of a particular column in a list view and add it into a text box?
body: <pre><code>Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As 
  System.EventArgs) Handles btnAdd.Click
  
      If txtCode.Text = "" Or txtName.Text = "" Or txtUnit.Text = "" Or txtPrice.Text = "" Then
          MsgBox("Please fill in all fields")
      Else
  
          Dim str(3) As String
          Dim itm As ListViewItem
  
  
          str(0) = LSet(txtName.Text, 8)
          str(1) = LSet(txtCode.Text, 3)
          str(2) = LSet(txtUnit.Text, 6)
          str(3) = LSet(txtPrice.Text, 20)
  
          itm = New ListViewItem(str)
  
          ListView1.Items.Add(itm)
  
          lblTotalItems.Text = ListView1.Items.Count
  
  
          txtCode.Text = ""
          txtName.Text = ""
          txtUnit.Text = ""
          txtPrice.Text = ""
      End If
  End Sub
  </code></pre>
  
  <p>I currently have this code for my list view, with more code in my global variables, I'm wanting to add up one column and place them in the Total text box, I know you have to loop through it and add them but i'm not sure how. </p>
  
  <p>Here is the image for the form
  <a href="https://i.stack.imgur.com/cBd7N.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/cBd7N.png" alt="enter image description here"></a></p>