1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32
| If CLng(DateAdd("m", -3 * k, AsOf)) < CLng(UpdateROPNBI) Then
UpdateROPNBI = DateSerial(Year(AsOf) - 1, 1, 1)
End If
If CLng(DateAdd("m", -3 * k, AsOf)) < CLng(UpdateROPPO) Then
UpdateROPPO = DateSerial(Year(AsOf) - 2, 12, 1)
End If
myreq = "Select Mnemo, Val FROM tbRWA_Params WHERE AsOf = " & CLng(UpdateROPNBI) & " AND Type = 'ROP NBI'"
rs.Open myreq, cn
If Not rs.EOF Then
ROP_NBI = rs.GetRows()
End If
rs.Close
myreq = "Select Mnemo, Val FROM tbRWA_Params WHERE AsOf = " & CLng(UpdateROPPO) & " AND Type = 'ROP Pertes OP'"
rs.Open myreq, cn
If Not rs.EOF Then
ROP_OP = rs.GetRows()
End If
rs.Close
Dim ROP_Coef() As Variant
ReDim ROP_Coef(2, UBound(ROP_NBI, 2))
'On croise les deux tableaux de coef ici:
For i = LBound(ROP_NBI, 2) To UBound(ROP_NBI, 2)
ROP_Coef(0, i) = ROP_NBI(0, i)
ROP_Coef(1, i) = ROP_NBI(1, i)
ROP_Coef(2, i) = ROP_OP(1, i)
Next i
... |
Partager