Hi.
I have a problem. In the code provided below I have three conditions where if I were to have a value of 0 then it won't show up on the listview, but it still shows up regardless. The first two conditions work finely, but the third condition doesn't. The third condition is based on the value zero on column 14, it isn't suppose to load the data with the 0 value. There is also an image that is provided in the link the will show the sheet.
Can anyone fix this problem, and explain to me what I am doing incorrectly. Thanks to everyone.
Code:
Image:
https://imgur.com/a/S4XIsV2
https://imgur.com/a/LXnskG8
Thank you
I have a problem. In the code provided below I have three conditions where if I were to have a value of 0 then it won't show up on the listview, but it still shows up regardless. The first two conditions work finely, but the third condition doesn't. The third condition is based on the value zero on column 14, it isn't suppose to load the data with the 0 value. There is also an image that is provided in the link the will show the sheet.
Can anyone fix this problem, and explain to me what I am doing incorrectly. Thanks to everyone.
Code:
Code:
With ListView2
.HideColumnHeaders = True
.Appearance = ccFlat
.ColumnHeaders.Clear
.View = lvwReport
.FullRowSelect = False
.HideSelection = True
.Gridlines = True
.ColumnHeaders.Add , , "Due Since", 110
.ColumnHeaders.Add , , "Clients-Nr", 72, Alignment:=1
.ColumnHeaders.Add , , "Clients-Nr", 0, Alignment:=1
End With
' Adds data
ListView2.ListItems.Clear
row = 4
Do Until Sheets("Payments_DB").Cells(row, 5) = ""
If (Sheets("Payments_DB").Cells(row, 5) <= Date + 5) _
And Sheets("Payments_DB").Cells(row, 14) > "0.00" _
And (Sheets("Payments_DB").Cells(row, 5) >= Date - 5) _
Or (Sheets("Payments_DB").Cells(row, 5) < Date) Then
Set Li = ListView2.ListItems.Add(Text:=Format(Sheet11.Cells(row, "A").Value, "General")) 'Property Address
Li.ListSubItems.Add Text:=Format(Sheet11.Cells(row, "N").Value, "#,##0.00")
Li.ListSubItems.Add Text:=Format(Sheet11.Cells(row, "E").Value, "m/d/yyyy")
End If
row = row + 1
Loop
Image:
https://imgur.com/a/S4XIsV2
https://imgur.com/a/LXnskG8
Thank you