morsoe
04-30-2015, 05:42 AM
Hi,
I am using Cells.Copy to populate a sheet with data from a newly opened source sheet. This method is convenient (as opposed to Sheets.Copy), because the target project contain formulas referring to the specific target sheet.
The source file is an Excel output from SAP/SRM system. With two identical versions of the same source file, excel will crash during cells.copy on the first version but carry out the method without crashing on the second.
This pattern seem to be consistent with observations of the Excel service pack update SP2 = version 14.0.7015.1000. (Previous SP Version 14.0.60291000 does not crash during this process).
The contents of both sheets are identical. One curious difference however, is that .SpecialCells(xlCellTypeLastCell) on the file crashing is AZ324 but IO324 on the file not causing the crash. There is no apparent reason for this difference. The source file can be significantly larger, however this as not influence.
The VBA causing this crash is
WS1.Cells.Copy
WSasapio.Paste
Both of which have been set as worksheets using set statement.
Best regards
Morten
I am using Cells.Copy to populate a sheet with data from a newly opened source sheet. This method is convenient (as opposed to Sheets.Copy), because the target project contain formulas referring to the specific target sheet.
The source file is an Excel output from SAP/SRM system. With two identical versions of the same source file, excel will crash during cells.copy on the first version but carry out the method without crashing on the second.
This pattern seem to be consistent with observations of the Excel service pack update SP2 = version 14.0.7015.1000. (Previous SP Version 14.0.60291000 does not crash during this process).
The contents of both sheets are identical. One curious difference however, is that .SpecialCells(xlCellTypeLastCell) on the file crashing is AZ324 but IO324 on the file not causing the crash. There is no apparent reason for this difference. The source file can be significantly larger, however this as not influence.
The VBA causing this crash is
WS1.Cells.Copy
WSasapio.Paste
Both of which have been set as worksheets using set statement.
Best regards
Morten