Results 1 to 4 of 4

Thread: adapt, copy paste with shapes, edges and values​​, to Excel2003.

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #3
    Forum Guru Rick Rothstein's Avatar
    Join Date
    Feb 2012
    Posts
    662
    Rep Power
    14
    Quote Originally Posted by Excel Fox View Post
    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
    Last edited by Rick Rothstein; 01-28-2013 at 11:03 PM.

Similar Threads

  1. Search and remove values ​​from a list
    By PcMax in forum Excel Help
    Replies: 4
    Last Post: 04-14-2013, 08:39 PM
  2. Macro Copy Columns and Paste in rows.
    By TommyKris in forum Excel Help
    Replies: 3
    Last Post: 03-06-2013, 02:36 PM
  3. VBA -- Copy/Paste across sheets
    By Rasm in forum Excel Help
    Replies: 4
    Last Post: 09-21-2012, 02:07 PM
  4. Replies: 9
    Last Post: 09-09-2011, 02:30 AM
  5. Trapping Copy To Range Before Copy/Cut Paste
    By Rasm in forum Excel Help
    Replies: 4
    Last Post: 04-07-2011, 07:48 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •