Results 1 to 4 of 4

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

  1. #1
    Member
    Join Date
    Aug 2012
    Posts
    72
    Rep Power
    13

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

    Hi.
    I need to copy paste with shapes, values ​​and edges but this code will be used in a Excel2003.
    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).PasteSpecial xlPasteValues
       Application.CutCopyMode = False
       Call Macro1
       Application.ScreenUpdating = True
    End Sub
    Thank you!!!

  2. #2
    Administrator Excel Fox's Avatar
    Join Date
    Mar 2011
    Posts
    1,402
    Rep Power
    10
    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
    A dream is not something you see when you are asleep, but something you strive for when you are awake.

    It's usually a bad idea to say that something can't be done.

    The difference between dream and aim, is that one requires soundless sleep to see and the other requires sleepless efforts to achieve

    Join us at Facebook

  3. #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.

  4. #4
    Member
    Join Date
    Aug 2012
    Posts
    72
    Rep Power
    13
    Hi.
    great, I loved the answers to two very thank you!

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
  •