View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Yorch Yorch is offline
external usenet poster
 
Posts: 1
Default Macro crashes "Automation error" during copy of workbook with char

When I run a macro, I try to copy an entire excel book and then, in the new
workbook I delete the worksheets I dont need.

I receive the message "Error in automation 21474178481(80010108)" and
closes the excel program. I think the problem is that some sheets have
charts.

The argument with the problem is:

Worksheets.copy here it crashes

If I run the macro in the vb debug view, it can copy the workbook without
problem. But after 3 or 4 runnings it crashes.

I have tried some other commands such as:
Dim SH As Worksheet
Set SH = Worksheets.copy

but it does not work. Any idea?