I have been trying to copy a range from an excel and paste it to the embedded excel of a native chart in PPT using xlPastevaluesAndNumberFormats of PasteSpecial method. For some reason it is not working. Could somebody help me understand what I am getting wrong.
Sample code and error pic below:
Private Sub UpdateSlide(targetslide As PowerPoint.Slide, thatsheet As Worksheet)
Dim StoreArray As Variant
Dim aShp As PowerPoint.Shape
Dim rng As Range
Set rng = thatsheet.Range("A1").CurrentRegion
rng.Copy
' StoreArray = rng
For Each aShp In targetslide.Shapes
If aShp.HasChart Then
With aShp.Chart.ChartData
Dim del_rng As Range
Set del_rng = .Workbook.Sheets(1).Range("A1") '.CurrentRegion
'del_rng.Resize(UBound(StoreArray, 1), UBound(StoreArray, 2)) = StoreArray 'This option works but screws up formatting
del_rng.PasteSpecial (xlPastevaluesAndNumberFormats) 'Fails here