Option Explicit

Function Main(ByVal finBL, ByVal CollectionLoans) 'VBScript
'VBA Function Main(ByVal finBL As ISfinSupport, ByVal CollectionLoans As finCollectionLoans)

' Function should iterate the CollectionLoans Collection updating User1..4 properties where required

Dim CollectionLoan 'As finCollectionLoan

  For Each CollectionLoan In CollectionLoans
    ' User1 = Number of Days allocated to this Group/ Collector
    CollectionLoan.User1 = Int(Now) - Int(CollectionLoan.DateAllocated)
  Next

End Function

