Results 1 to 8 of 8

Thread: To Paste special by value

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Junior Member
    Join Date
    Aug 2013
    Posts
    18
    Rep Power
    0

    Import data as values

    Hi ravichandavar,

    Try replacing this line...

    Code:
    ActiveWorkbook.ActiveSheet.Range("A1:O100").Copy Destination:=ThisWorkbook.Worksheets("Upload").Cells(j, "A")
    ...with these lines:

    Code:
    ActiveWorkbook.ActiveSheet.Range("A1:O100").Copy
        ThisWorkbook.Worksheets("Upload").Cells(j, "A").PasteSpecial Paste:=xlPasteValues
        Application.CutCopyMode = False
    Regards,

    Robert

  2. #2
    Junior Member
    Join Date
    Aug 2012
    Posts
    12
    Rep Power
    0
    Hi Robert,

    Thanks for the quick solution. Its working fine.

    Regards,
    Ravi.C

  3. #3
    Forum Guru Rick Rothstein's Avatar
    Join Date
    Feb 2012
    Posts
    662
    Rep Power
    14
    Quote Originally Posted by Trebor76 View Post
    Hi ravichandavar,

    Try replacing this line...

    Code:
    ActiveWorkbook.ActiveSheet.Range("A1:O100").Copy Destination:=ThisWorkbook.Worksheets("Upload").Cells(j, "A")
    ...with these lines:

    Code:
    ActiveWorkbook.ActiveSheet.Range("A1:O100").Copy
        ThisWorkbook.Worksheets("Upload").Cells(j, "A").PasteSpecial Paste:=xlPasteValues
        Application.CutCopyMode = False
    Alternately, you could do the same thing with this single line of code...

    Code:
    ThisWorkbook.Worksheets("Upload").Cells(j, "A").Range("A1:O100").Value = ActiveWorkbook.ActiveSheet.Range("A1:O100").Value
    I am not 100% sure of how your setup looks, but I am pretty sure you do not need the part of the code I highlighted in red and I am not so sure whether you need the part of your code I highlighted in blue either.
    Last edited by Rick Rothstein; 08-12-2013 at 10:33 PM.

Similar Threads

  1. Remove Special Characters From Text Or Remove Numbers From Text
    By Excel Fox in forum Excel and VBA Tips and Tricks
    Replies: 5
    Last Post: 05-31-2013, 04:43 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. Replies: 2
    Last Post: 02-23-2013, 09:18 PM
  4. VBA -- Copy/Paste across sheets
    By Rasm in forum Excel Help
    Replies: 4
    Last Post: 09-21-2012, 02:07 PM
  5. Remove Special Characters :
    By Rajan_Verma in forum Rajan Verma's Corner
    Replies: 3
    Last Post: 03-06-2012, 09:41 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
  •