Hi,
I encountered problem when using code to copy&paste charts as enhanced metafile from one sheet to another. Programme is not responding for quite long time then it diplays 1004 error. I suppose problem is in the line:
ActiveSheet.PasteSpecial Format:="Picture (Enhanced Metafile)", Link:=False, DisplayAsIcon:=False
Thanks for suggestions.
I encountered problem when using code to copy&paste charts as enhanced metafile from one sheet to another. Programme is not responding for quite long time then it diplays 1004 error. I suppose problem is in the line:
ActiveSheet.PasteSpecial Format:="Picture (Enhanced Metafile)", Link:=False, DisplayAsIcon:=False
Thanks for suggestions.
Code:
Sub createTables()
Workbooks("AAA.xlsm").Worksheets("AA").Activate
For i = 1 To 3
Workbooks("AAA.xlsm").Worksheets("AA").Activate
Workbooks("AAA.xlsm").Worksheets("AA").Range("A3").Value = i
Workbooks("AAA.xlsm").Worksheets("AA").Calculate
Workbooks("AAA.xlsm").Worksheets("AA").ChartObjects("Chart 1").CopyPicture Appearance:=xlScreen, Format:=xlPicture
Workbooks("BBB.xlsx").Worksheets(i).Activate
Workbooks("BBB.xlsx").Worksheets(i).Range("B2").Select
ActiveSheet.PasteSpecial Format:="Picture (Enhanced Metafile)", Link:=False, DisplayAsIcon:=False
Next i
End Sub