VBA to Copy Chart and Shapes together and paste as picture

Rahul Malhotra

New member
Joined
Apr 18, 2018
Messages
43
Reaction score
0
Points
0
Excel Version(s)
2013, 2016
Hi, I am looking for the VBA so by clicking on the chart i can copy chart and related shapes and paste to the new worksheet as picture.

Any help would highly be appreciated. Thank you in advance.

Regards,
 
Currently i am using the below script but its not copying the shape.

Sub Chart74_Click()
ActiveSheet.ChartObjects("Chart 74").CopyPicture
ActiveSheet.Shapes("Round Diagonal Corner Rectangle 11").CopyPicture

MsgBox ("Chart copied to clipboard. You can now paste this into another application.")
End Sub
 
Currently i am using the below script but its not copying the shape.

Code:
[COLOR=#333333]Sub Chart74_Click()[/COLOR]
[COLOR=#333333]ActiveSheet.ChartObjects("Chart 74").CopyPicture[/COLOR]
[COLOR=#333333]ActiveSheet.Shapes("Round Diagonal Corner Rectangle 11").CopyPicture[/COLOR]

[COLOR=#333333]MsgBox ("Chart copied to clipboard. You can now paste this into another application.")[/COLOR]
[COLOR=#333333]End Sub[/COLOR]
 
try:
Code:
Sub Chart74_Click()
ActiveSheet.DrawingObjects(Array("Round Diagonal Corner Rectangle 11", "Chart 74")).CopyPicture
[COLOR=#333333]MsgBox ("Chart copied to clipboard. You can now paste this into another application.")[/COLOR]
End Sub
 
Woow its worked perfectly p45cal. Thank you so much.
 
Back
Top