asyamonique
Well-known Member
- Joined
- Jan 29, 2008
- Messages
- 1,286
- Office Version
- 2013
- Platform
- Windows
Code:
Private Sub CommandButton1_Click()
Dim r As Long, Ac As Long, c As Long
If ComboBox1.Value <> -1 And ComboBox2.Value <> -1 Then
ListBox1.Clear
With Worksheets("reports").Range("A1:A1000")
ReDim Ray(1 To .Count, 1 To 6)
For r = 1 To .Rows.Count
With ListBox1
.ColumnCount = 6
.ColumnWidths = "0;0;80;350;100;100"
End With
If ComboBox1.Value = .Cells(r, 1).Value And ComboBox2.Value = .Cells(r, 2).Value Then
c = c + 1
For Ac = 1 To 6
Ray(c, Ac) = .Cells(r, Ac)
Next Ac
End If
Next r
End With
End If
ListBox1.list = Ray
End Sub
Hello,
Is it possible add additional code to given above code to show on textbox1 sum of listbox1 5th column vaues?
Many Thanks