ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   copy paste problem (https://www.excelbanter.com/excel-programming/445655-copy-paste-problem.html)

Keith Willis

copy paste problem
 
Hi

I'm using the following code to try to paste over some formulas as
value by all i get is "object does not support this property or method
on the paste line, any thoughts?

xlWB.sheets("Formulas").Cells.Select
myExcel.Selection.Copy
xlWB.sheets("Formulas").range("A1").Activate
myExcel.sheets("Formulas").activecell.PasteSpecial
Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
xlWB.CutCopyMode = False

xlWb is the workbook object
myExcel is the application object

[email protected][_2_]

copy paste problem
 
Give a try this:

With Worksheets("Formulas").Range("A1:IV5000")
..Value = .Value
End With

Keith Willis

copy paste problem
 
that did it, thanks a million

Don Guillett[_2_]

copy paste problem
 
On Monday, April 2, 2012 6:33:42 AM UTC-5, Keith Willis wrote:
that did it, thanks a million


That may have taken awhile. Could have been faster with

With Worksheets("Formulas").usedrange.specialcells(xlfo rmulas)
..Value = .Value
End With

[email protected][_2_]

copy paste problem
 
Thanks Don.


All times are GMT +1. The time now is 05:53 PM.

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