rhombus4
Well-known Member
- Joined
- May 26, 2010
- Messages
- 586
- Office Version
- 365
- 2016
- Platform
- Windows
When I step through the code below, it works fine, however when I run the code it seems to run forever and I get an error on the ActiveSheet.Paste line
Run-time error '1004': Paste method of worksheet class failed
Run-time error '1004': Paste method of worksheet class failed
VBA Code:
Sub Copy_Paste_Chart()
Worksheets("Sheet1").ChartObjects("Chart 1").CopyPicture xlScreen, xlPicture
Worksheets("Sheet2").Select
Cells(4, 3).Select
ActiveSheet.Paste
With ActiveSheet
With .Shapes(.Shapes.Count)
.Name = "chtName1"
End With
End With
End Sub