I want to copy and paste values but bypass the clipboard. I do :
Sheets("Sheet1").Range("a1:b10").Copy _
Sheets("Sheet2").Range("a1").xlValues
it doesnt like it
What should I do instead
I want to copy and paste values but bypass the clipboard. I do :
Sheets("Sheet1").Range("a1:b10").Copy _
Sheets("Sheet2").Range("a1").xlValues
it doesnt like it
What should I do instead
Why do you need to bypass the clipboard?
____________________________________________
Nihil simul inventum est et perfectum
Abusus non tollit usum
Last night I dreamed of a small consolation enjoyed only by the blind: Nobody knows the trouble I've not seen!
James Thurber
Sheets("Sheet1").Range("a1:b10").Copy Destination:=Sheets("Sheet2").Range("a1")
but you need to use paste special
Regards,
Simon
Please read this before cross posting!
In the unlikely event you didn't get your answer here try Microsoft Office Discussion @ The Code Cage
If I have seen further it is by standing on the shoulders of giants.
Isaac Newton, Letter to Robert Hooke, February 5, 1675 English mathematician & physicist (1642 - 1727)
I bypass the clipboard because in some instances I copy from another spreadsheet and it eliminates hassle.
It is the pastespecial I am having trouble with so in the reply below :-
Sheets("Sheet1").Range("a1:b10").Copy Destination:=Sheets("Sheet2").Range("a1")
How would I adapt that for pastespecial values
record it in the macro recorder.....however you wil always use the clipboard if you copy something, if you reference it via formula you do not use the clipboard but if the values in the source book change then so will your destination book when both are open!
Regards,
Simon
Please read this before cross posting!
In the unlikely event you didn't get your answer here try Microsoft Office Discussion @ The Code Cage
If I have seen further it is by standing on the shoulders of giants.
Isaac Newton, Letter to Robert Hooke, February 5, 1675 English mathematician & physicist (1642 - 1727)
[VBA]
Sub Macro1()
Range("A1:A10").copy
With Sheets("Sheet2").Range("A1")
.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
End With
End Sub
[/VBA]
Regards,
Simon
Please read this before cross posting!
In the unlikely event you didn't get your answer here try Microsoft Office Discussion @ The Code Cage
If I have seen further it is by standing on the shoulders of giants.
Isaac Newton, Letter to Robert Hooke, February 5, 1675 English mathematician & physicist (1642 - 1727)
Hi, philfer,
just copy values directly without using copy&paste:
Ciao,Sheets("Sheet2").Range("A1").Resize(10, 1).Value = _ Sheets("Sheet1").Range("A1").Resize(10, 1).Value
Holger
Simple answer is - you can't - bypassing the clipboard like that only works for a straight paste, not a pastespecial. If you only want the values, copy them directly without a paste as HaHoBe has shown.Originally Posted by philfer
You know you're really in trouble when the light at the end of the tunnel turns out to be the headlight of a train hurtling towards you
The major part of getting the right answer lies in asking the right question...
Made your code more readable, use VBA tags (this automatically inserts [vba] at the start of your code, and [/vba ] at the end of your code) | Help those helping you by marking your thread solved when it is.
Sheets("Sheet2").Range("a1:b10").Value= Sheets("Sheet1").Range("a1:b10").Value