mmn1000
Board Regular
- Joined
- Mar 17, 2020
- Messages
- 90
- Office Version
- 2019
- 2013
- Platform
- Windows
Hello
I have a list box inside a user form and I want to display the total amount in the list box in a text box or label
For this I used the following code
The problem is that when I type in the search form, it displays the total. How do I modify the code to display the search total (limited filtered)?
I have a list box inside a user form and I want to display the total amount in the list box in a text box or label
For this I used the following code
VBA Code:
Private Sub sum_subjects()
Dim total_v As Double
For i = 0 To ListBox1.ListCount - 1
total_v = total_v + Val(ListBox1.Column(5, i))
geo_v = geo_v + Val(ListBox1.Column(6, i))
Next
sum_total.Caption = total_v
sum_geo.Caption = geo_v
End Sub