copy method of range object

P

Peter

i have this line which copies and pastes in the one statement:

Sheets("AUS-SA_AgeGrp4M").Range("a1:aq" & LRow).Copy
Destination:=Sheets("Sheet2").Cells(1, LCol + 1)

could someone pls suggest what the code would look like to make it paste as
paste special?
 
B

Bob Bridges

Oh, wait, I did this once. Um...here it is. It depends on what special sort
of paste you want to do; if you just want Paste Values, for instance, do it
like this:

Sheets("AUS-SA_AgeGrp4M").Range("a1:aq" & LRow).Copy
Sheets("Sheet2").Cells(1, LCol + 1).PasteSpecial Paste := xlPasteValues

But you can control the other options, too: comments, all-except-borders,
the arithmetic operations, transpose, all that stuff. If you don't already
know where to find the .chm file for VBA/Excel on your machine, it's past
time you found it, created a link to it and brought it up whenever you have
to code: It makes it a lot easier to find stuff like this. Let me know if
this is a mystery to you and I'll give you some pointers; it's an invaluable
documentation guide, much easier to use than your VBE Help option (in my
opinion).
 
P

Peter

hey bob.
you saved my arse mate!!!
thanks so much.
i am so bad at trying to learn this language.
re
If you don't already
know where to find the .chm file for VBA/Excel on your machine, it's past
time you found it, --

......ys pls!

Peter
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top