
Originally Posted by
Excel Fox
Why don't you simply try the paste method without the pastespecial method
Code:
Sub copy_paste_with_shapes_values_and_edges()
Application.ScreenUpdating = False
Sheets("Copia").Cells.ClearContents
ThisWorkbook.Sheets("edital").Range("a7:m1000").copy Sheets("Copia").Range("A" & Rows.Count).End(xlUp)
Call Macro1
Application.ScreenUpdating = True
End Sub
Since the code clears the contents of the cells in the Copia sheet, you might as well just specify cell A1 directly for the copy destination. Also, I do not see the need to specify the ThisWorkbook reference as that is the default and both the "edital" and the "Copia" sheets appear to be in it. So, your code suggestion should be able to be reduced to this...
Code:
Sheets("edital").Range("a7:m1000").Copy Sheets("Copia").Range("A1")
Although I would point out that this code line will copy formats as well as values and the OP's original code showed he was copying values only. So maybe this code line would be more appropriate...
Code:
Sheets("Copia").Range("A1:M994").Value = Sheets("edital").Range("A7:M1000").Value
Bookmarks