Public Function ListeJoursMoisFiscal2() As Date()
'Variables
Dim DateDebut, DateFin As Date
Dim DateDebutVal, DateFinVal As Double
Dim Liste As Integer
'Initialisation des paramètres
N = 0
DateDebut = ActiveWorkbook.Worksheets("Param").Range("B22").Value
DateFin = ActiveWorkbook.Worksheets("Param").Range("C22").Value
DateDebutVal = CDbl(DateDebut)
DateFinVal = CDbl(DateFin)
'Parcours de toutes les dates situées dans le mois fiscal désiré, et les range dans une liste
ReDim ListeJoursFiscal2(DateFinVal - DateDebutVal)
For i = DateDebutVal To DateFinVal
ListeJoursFiscal2(N) = CDate(i)
MsgBox ListeJoursFiscal2(N)
N = N + 1
Next i
End Function
Sub use_TCD()
'Variables
Dim MoisFiscal As String
MoisFiscal = ChoixMoisFiscal
Dim Dates() As Date
Dates = ListeJoursMoisFiscal2()
MsgBox UBound(Dates)
End Sub