P
Paste charts as enchanced metafile
I have a sheet with a number of charts. I want to copy them to another sheet
as a single picture. The following code works, but the picture loses
resolution.
'Copies graphs as picture
Sheets("Graphs").Select
Range("A1:R51").Select
Selection.CopyPicture Appearance:=xlScreen, Format:=xlPicture
Range("A1").Select
'Pastes graph picture to summary sheet
Sheets("Static Summary Sheet").Select
Range("A1").Select
ActiveSheet.Paste
I have replaced the code with:
'Copies graphs as picture
Sheets("Graphs").Select
ActiveSheet.Shapes.SelectAll
Selection.Copy
Range("A1").Select
'Pastes graph picture to summary sheet
Sheets("Static Summary Sheet").Select
Range("D5").Select
ActiveSheet.PasteSpecial Format:="Picture (Enhanced Metafile)",
Link:=False _
, DisplayAsIcon:=False
Selection.Top = 69.75
Selection.Left = 37.5
Now I get an error in the pastespecial line "PasteSpecial method of
Worksheet class failed.
Any ideas?
as a single picture. The following code works, but the picture loses
resolution.
'Copies graphs as picture
Sheets("Graphs").Select
Range("A1:R51").Select
Selection.CopyPicture Appearance:=xlScreen, Format:=xlPicture
Range("A1").Select
'Pastes graph picture to summary sheet
Sheets("Static Summary Sheet").Select
Range("A1").Select
ActiveSheet.Paste
I have replaced the code with:
'Copies graphs as picture
Sheets("Graphs").Select
ActiveSheet.Shapes.SelectAll
Selection.Copy
Range("A1").Select
'Pastes graph picture to summary sheet
Sheets("Static Summary Sheet").Select
Range("D5").Select
ActiveSheet.PasteSpecial Format:="Picture (Enhanced Metafile)",
Link:=False _
, DisplayAsIcon:=False
Selection.Top = 69.75
Selection.Left = 37.5
Now I get an error in the pastespecial line "PasteSpecial method of
Worksheet class failed.
Any ideas?