Dear firends,
I have a userform "frmSuivi" in which I want to display some calculations ,among them count and sumif
I have set up the functions for those calculations but the result is "0".I think the problem is related to numbers format in the sheet ,knowing that the data is entered via another userform.I could not figure out how to get this problem over .
Could someone help me to go through.
the code is put in userform initialize
Thanks in advance,
I have a userform "frmSuivi" in which I want to display some calculations ,among them count and sumif
I have set up the functions for those calculations but the result is "0".I think the problem is related to numbers format in the sheet ,knowing that the data is entered via another userform.I could not figure out how to get this problem over .
Could someone help me to go through.
the code is put in userform initialize
Code:
Private Sub UserForm_Initialize()
sn = Sheets("BDD").Cells(1).CurrentRegion
For j = 1 To UBound(sn, 2)
ListView10.ColumnHeaders.Add , , sn(1, j), 90
Next
For j = 2 To UBound(sn)
With ListView10.ListItems.Add(, , sn(j, 1))
For jj = 2 To UBound(sn, 2)
.ListSubItems.Add , , sn(j, jj)
Next
End With
Next
ListView10_Click
'Sum of paid invoices
Dim rB As Range
Dim dResult As Variant
Set rB = Worksheets("BDD").Range("G2:G1000")
dResult = Application.WorksheetFunction.SumIfs(rB.Offset(0, 4), rB, "Paid")
TextBox7 = dResult
end sub
Last edited by a moderator: