Copy and Paste Values

I cannot figure out how to copy and paste as values using VBA without acually selecting the cells when I paste and using the same code the macro recorder generates when I record a copy and paste as values. What would be the code for copying cells a1:a10 and pasting as values in cells b1:b10 without selecting the cells

range("a1:a10).copy

Then what



Answer this question

Copy and Paste Values

  • DarkByte

    Hi Joe,

    Here's some info from our support engineer:

    ====

    Sub CopyTest()< xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" />

        Range("A1:A10").Copy

        Range("B1:B10").PasteSpecial (xlPasteAll)

    Application.CutCopyMode = False

    End Sub

    ====

    I hope above code can help our buddy. If he has any further requests, please feel free to let me know. Thank you. J Ming

    -brenda (ISV Buddy Team)



  • Marshie

    This is the acual code, the above post was a tiny bit off, thanks though:

     

    Sub TestDis()

    Sheets("Sheet1").Range("a1:a10").Copy
    Sheets("Sheet1").Range("b1:b10").PasteSpecial (xlPasteValues)
    Application.CutCopyMode = False

    End Sub


  • Copy and Paste Values