ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Paste values? (https://www.excelbanter.com/excel-programming/434185-paste-values.html)

XP

Paste values?
 
I've copied a single area rectanular group of cells.

The program opens a new file. A specific start cell is selected (C9).

Now I want to paste values. What is the line of code to paste values?



Per Jessen

Paste values?
 
Hi

This should do it:

Range("C9").PasteSpecial xlPasteValues

Regards,
Per

"xp" skrev i meddelelsen
...
I've copied a single area rectanular group of cells.

The program opens a new file. A specific start cell is selected (C9).

Now I want to paste values. What is the line of code to paste values?




XP

Paste values?
 

I get "Pastespecial method of Range class failed" error...any other ideas?


"Per Jessen" wrote:

Hi

This should do it:

Range("C9").PasteSpecial xlPasteValues

Regards,
Per

"xp" skrev i meddelelsen
...
I've copied a single area rectanular group of cells.

The program opens a new file. A specific start cell is selected (C9).

Now I want to paste values. What is the line of code to paste values?





Per Jessen

Paste values?
 
Did you copy the cells before PasteSpecal?

Post your code, so we can see what is going wrong.

Regards,
Per

"xp" skrev i meddelelsen
...

I get "Pastespecial method of Range class failed" error...any other ideas?


"Per Jessen" wrote:

Hi

This should do it:

Range("C9").PasteSpecial xlPasteValues

Regards,
Per

"xp" skrev i meddelelsen
...
I've copied a single area rectanular group of cells.

The program opens a new file. A specific start cell is selected (C9).

Now I want to paste values. What is the line of code to paste values?






ryguy7272

Paste values?
 
Probably, the easiest way to do this is to record a macro and view the results:

Range("C9").Select
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone,
SkipBlanks _
:=False, Transpose:=False

HTH,
Ryan---

--
Ryan---
If this information was helpful, please indicate this by clicking ''Yes''.


"xp" wrote:


I get "Pastespecial method of Range class failed" error...any other ideas?


"Per Jessen" wrote:

Hi

This should do it:

Range("C9").PasteSpecial xlPasteValues

Regards,
Per

"xp" skrev i meddelelsen
...
I've copied a single area rectanular group of cells.

The program opens a new file. A specific start cell is selected (C9).

Now I want to paste values. What is the line of code to paste values?






All times are GMT +1. The time now is 09:14 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com