Thank you snb!
The sorting is awesome.
I hadn't noticed why you removed the Mod button from the userform until I was commenting all the subs and noticed what you did.
When we select an item in the bill list its values are available in the entry box above. changing those values updates the list values, nicely done!
I added the routine to sum the bills by week.
I am still having issues with the bills values in the lbList being added or removed from the dcell after the lbList has been altered after initialization.Sub addSums_UF() Dim Result, BillsTotal As Double Dim Bills As Variant Dim Bill As String Dim b, x As Long Dim P1, NumberFromBill With ufCal If .cb_sums.Value = True Then z = 1 For y = 0 To 35 Step 7 Result = 0 For x = 1 To 7 For b = 0 To .Controls("dcell" & x + y).ListCount - 1 Bill = .Controls("dcell" & x + y).List(b) P1 = InStr(1, Bill, "-") NumberFromBill = Trim(Right(Bill, Len(Bill) - P1)) Result = Result + NumberFromBill Next b Next x .Controls("sum" & z).Caption = Result z = z + 1 Next y Else For z = 1 To 6 .Controls("sum" & z).Caption = "" Next z End If End With End Sub
If I add, remove or modify the values in the lbList then add the bills to the dcells the list is representative of the intialized values, not the current values.
How do I take the current values in the lbBills list to fill the dcells? - not the initialized values





Reply With Quote