How to Total/sum 1 specific column from a userform listbox to display in a textbox on same form

Private Sub blnSelect_Click()
Dim i As Integer
Dim mySum As Integer
For i = 0 To Me.lstCustomer.ListCount - 1
    mySum = mySum + Me.lstCustomer.Column(1, i)
Next i
MsgBox mySum
End Sub


https://stackoverflow.com/questions/40190859/how-to-sum-1-specific-column-from-a-userform-listbox-to-display-in-a-textbox-on


For i = 0 To Me.lst_Team.ListCount - 1
    mySum = mySum + Me.lst_Team.Column(3, i)
Next i

Comments

Popular posts from this blog

Export Access Object to Excel ,PDF, RTF , etc. using DoCmd.OutputTo

HOW TO OPEN ACCESS IN FULL SCREEN: OPENING A FORM AS MAXIMIZED ?

DoCmd.OutputTo in xlsx (Excel 2007+) Format