Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Better way for xlPasteValues?

Status
Not open for further replies.

Groves22

Technical User
Jan 29, 2009
102
US
I was just wondering if there was a better way to paste values.

What I have now is:

Code:
        .Range("AH140:AH165").Copy
        .Range("AH140:AH165").PasteSpecial xlPasteValues

I tried:

Code:
        .Range("AH140:AH165").Copy .Range("AH140:AH165").PasteSpecial xlPasteValues

But it didn't work.

Thanks
 



Hi,

Is there a problem with your original method?

Skip,
[glasses]Don't let the Diatribe...
talk you to death![tongue]

[glasses]Just traded in my old subtlety...
for a NUANCE![tongue]
 
nope - 2 commands is how you have to do it

Your trial will fail as the COPY method will only do a full paste using the optional "destination" argument

The only other option, depending on your requirements would be to use something like

.Range("AH140:AH165").value = .Range("AH140:AH165").value

- I assume this is an effort to remove formulae.....

Rgds, Geoff

We could learn a lot from crayons. Some are sharp, some are pretty and some are dull. Some have weird names and all are different colours but they all live in the same box.

Please read FAQ222-2244 before you ask a question
 
What about something like this ?
.Range("AH140:AH165").Value = .Range("AH140:AH165").Value

Hope This Helps, PH.
FAQ219-2884
FAQ181-2886
 
I guess not, but it still makes the screen flash to the page/cells.

I guess if there isn't a good way, ScreenUpdating should solve the problem.
 
Thanks xlbo and PHV...
That seemed to work great!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top