Šo‚¦‘‚«

2007.06.01 (‹à) 15:16
ugnag


'V’è—¦–@‚É‚æ‚éž‹pŒÀ“xŠzŒvŽZ
' by ugnag
Public Function ž‹pŒÀ“xŠzŽZo(Žæ“¾‰¿Šz, _
ž‹p—¦, _
‰”N“xŒŽ”, _
ž‹p•ÛØ—¦, _
‰ü’ùž‹p—¦, _
”N”)


Dim ŠúŽñ•ë‰¿ As Long
Dim Šú––•ë‰¿ As Long
Dim ’²®‘Ož‹pŠz As Long
Dim ž‹p•ÛØŠz As Long
Dim ŒvŽZ’†”N“x As Integer
Dim ‰ü’ùŽæ“¾Šz As Long
Dim ž‹pŒÀ“xŠz As Long


ž‹p•ÛØŠz = Int(Žæ“¾‰¿Šz * ž‹p•ÛØ—¦)
If ž‹p•ÛØŠz
ž‹pŒÀ“xŠzŽZo = 0
Exit Function
End If

‰ü’ùŽæ“¾Šz = -1

ŠúŽñ•ë‰¿ = Žæ“¾‰¿Šz
For ŒvŽZ’†”N“x = 1 To ”N”
’²®‘Ož‹pŠz = Int(ŠúŽñ•ë‰¿ * ž‹p—¦)
If ‰ü’ùŽæ“¾Šz
If ’²®‘Ož‹pŠz
‰ü’ùŽæ“¾Šz = ŠúŽñ•ë‰¿
End If
End If

If 0
ž‹pŒÀ“xŠz = Int(‰ü’ùŽæ“¾Šz * ‰ü’ùž‹p—¦)
If ŠúŽñ•ë‰¿ - ž‹pŒÀ“xŠz
ž‹pŒÀ“xŠz = ŠúŽñ•ë‰¿ - 1
End If
Else
If ŒvŽZ’†”N“x = 1 Then
ž‹pŒÀ“xŠz = Int(’²®‘Ož‹pŠz * ‰”N“xŒŽ” / 12)
Else
ž‹pŒÀ“xŠz = ’²®‘Ož‹pŠz
End If
End If

Šú––•ë‰¿ = ŠúŽñ•ë‰¿ - ž‹pŒÀ“xŠz

ŠúŽñ•ë‰¿ = Šú––•ë‰¿

Next ŒvŽZ’†”N“x


ž‹pŒÀ“xŠzŽZo = ž‹pŒÀ“xŠz


End Function

[7] beginning...
[1] comments (3)
-


[7] << •Ï”•¶Žš•ÏŠ·‰æ–Ê
[9] ƒ†[ƒU[’è‹`ƒtƒ@ƒ“ƒNƒVƒ‡ƒ“ >>
[0] [top]


[sb 1.10R]