If the function uses the parameters startdate and enddate, I found following code from vbcity.com
Code
Public Function Days360(StartDate As Date, EndDate As Date, Optional Method As Boolean = False) As Long
Dim TempMonths As Long
Dim StartDay As Long
Dim EndDay As Long
StartDay = Day(StartDate)
EndDay = Day(EndDate)
If Not Method Then
If StartDay > 30 Then
StartDate = DateAdd("d", -1, StartDate)
End If
If EndDay = 31 And StartDay > 30 Then
EndDate = DateAdd("d", 1, EndDate)
Else
If EndDay = 31 Then
EndDate = DateAdd("d", -1, EndDate)
End If
End If
Else
If StartDay > 30 Then
StartDate = DateAdd("d", -1, StartDate)
End If
If EndDay > 30 Then
EndDate = DateAdd("d", -1, EndDate)
End If
End If
StartDay = Day(StartDate)
EndDay = Day(EndDate)
TempMonths = DateDiff("M", StartDate, EndDate)
Days360 = (TempMonths * 30) + (EndDay - StartDay)
End Function