'Area Chart FINANCES YEAR
If OP_FinancesYear.Value = True And LB_FinanceCats.ListIndex = 0 And TB_StackedFinances.Value = True Then
Worksheets("TempG").ChartObjects("FinanceMonth1cat").Chart.SeriesCollection(1).Name = LB_FinanceCats.Column(0, LB_FinanceCats.ListIndex)
Worksheets("TempD").Activate
Range("A2").Activate
ReDim dt(1 To 1)
'===============================================
'============ Populates the Dynamic Range of Dates =========
'===============================================
Do Until ActiveCell.Value = ""
dt(UBound(dt)) = Day(ActiveCell.Value) & "-" & Month(ActiveCell.Value)
ActiveCell.Offset(1, 0).Activate
If Not ActiveCell.Offset(1, 0).Value = "" Then ReDim Preserve dt(1 To UBound(dt) + 1)
Loop
'===============================================
'============ Use that Range to Populate Data for Dates ======
'===============================================
ReDim d(1 To 12, 1 To UBound(dt))
j = 0
For i = UBound(dt) To 1 Step -1
d(1, i) = Worksheets("TempD").Range("P65000").End(xlUp).Offset(j, 0).Value - Worksheets("TempD").Range("P65000").End(xlUp).Offset(j - 1, 0).Value
d(2, i) = Worksheets("TempD").Range("O65000").End(xlUp).Offset(j, 0).Value - Worksheets("TempD").Range("O65000").End(xlUp).Offset(j - 1, 0).Value
d(3, i) = Worksheets("TempD").Range("N65000").End(xlUp).Offset(j, 0).Value - Worksheets("TempD").Range("N65000").End(xlUp).Offset(j - 1, 0).Value
d(4, i) = Worksheets("TempD").Range("R65000").End(xlUp).Offset(j, 0).Value - Worksheets("TempD").Range("R65000").End(xlUp).Offset(j - 1, 0).Value
d(5, i) = Worksheets("TempD").Range("AF65000").End(xlUp).Offset(j, 0).Value - Worksheets("TempD").Range("AF65000").End(xlUp).Offset(j - 1, 0).Value
d(6, i) = Worksheets("TempD").Range("S65000").End(xlUp).Offset(j, 0).Value - Worksheets("TempD").Range("S65000").End(xlUp).Offset(j - 1, 0).Value
d(7, i) = Worksheets("TempD").Range("X65000").End(xlUp).Offset(j, 0).Value - Worksheets("TempD").Range("X65000").End(xlUp).Offset(j - 1, 0).Value
d(8, i) = Worksheets("TempD").Range("AE65000").End(xlUp).Offset(j, 0).Value - Worksheets("TempD").Range("AE65000").End(xlUp).Offset(j - 1, 0).Value
d(9, i) = Worksheets("TempD").Range("L65000").End(xlUp).Offset(j, 0).Value - Worksheets("TempD").Range("L65000").End(xlUp).Offset(j - 1, 0).Value
d(10, i) = Worksheets("TempD").Range("Q65000").End(xlUp).Offset(j, 0).Value - Worksheets("TempD").Range("Q65000").End(xlUp).Offset(j - 1, 0).Value
d(11, i) = Worksheets("TempD").Range("M65000").End(xlUp).Offset(j, 0).Value - Worksheets("TempD").Range("M65000").End(xlUp).Offset(j - 1, 0).Value
d(12, i) = Worksheets("TempD").Range("T65000").End(xlUp).Offset(j, 0).Value - Worksheets("TempD").Range("T65000").End(xlUp).Offset(j - 1, 0).Value
j = j - 1
Next
'===============================================
'============ Puse All Arrays Into Chart =================
'===============================================
ReDim dMIN(1 To UBound(d, 2))
Worksheets("TempG").ChartObjects("FinanceYear").Chart.SeriesCollection(1).XValues = Array(dt)
For i = 1 To 12
For j = 1 To UBound(dMIN)
dMIN(j) = d(i, j)
Next
Worksheets("TempG").ChartObjects("FinanceYear").Chart.SeriesCollection(i).Values = dMIN
Next
'============ Copy chart on Useform ==================
'===============================================
Worksheets("TempG").ChartObjects("FinanceYear").Chart.CopyPicture xlScreen, xlPicture
Main.PB_CurrentFinance.Picture = PastePicture(xlPicture)
End If