-
Excel 2016 .CopyPicture
Hello. We have an existing macro that has run successfully for years on Excel 2010. The macro creates charts, copies pictures of the charts to another tab.
We upgraded to Excel 2016 last week. And the following line of code now works incorrectly. It only copies part of the range.
Code:
rRange_To_Copy.CopyPicture xlScreen, xlPicture
Has anyone else experienced this? Is there a work around?
Thanks!
-
1 Attachment(s)
Not sure I completely understand, but this works in 2016
Code:
Option Explicit
Sub test()
Dim rRange_To_Copy As Range
Set rRange_To_Copy = ActiveSheet.Range("A1:C3")
rRange_To_Copy.CopyPicture xlScreen, xlPicture
Worksheets("Sheet2").Select
Range("D4").Select
ActiveSheet.PasteSpecial Format:="Picture (Enhanced Metafile)", Link:=False, DisplayAsIcon:=False
End Sub