Problem with pasting picture in Excel 2016

louiserace

New Member
Joined
Jun 24, 2015
Messages
15
I have written a macro that pastes a chart onto a graph. This worked fine when I was on Excel 2013 but it now crashes in Excel 2016.

The code is as follows:

Code:
Sub ResultBox(currentRow As Long, copiedChart As Chart)


ResultsTable.[B1] = Data.Range("B" & currentRow)


ResultsTable.[I3:I15].AutoFilter 1, "<>"
ResultsTable.[B3:D15].Copy


copiedChart.Pictures.Select


With copiedChart.Pictures.Paste
    .ShapeRange.Left = 112.5
    .ShapeRange.Top = 191.0155905512
End With


End Sub

The error is Run time error '1004': Unable to get the Paste property of the Pictures class.

This occurs on the line that says 'With copiedChart.Pictures.Paste'

This all worked perfectly on Excel 2013 so can anyone help with what I need to change to make it work now.

Thanks
 

Excel Facts

Spell Check in Excel
Press F7 to start spell check in Excel. Be careful, by default, Excel does not check Capitalized Werds (whoops)

Forum statistics

Threads
1,215,731
Messages
6,126,537
Members
449,316
Latest member
sravya

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top