PasteSpecial

K

Kevin

I am using past special to paste a formula into a cell
range. My code is as follows:

With Worksheets(1)
.Range(Cells(40, 2), Cells(51, 2)).Copy
.Range(Cells(curRow, colCount + 1), Cells(maxRow,
colCount + 2)).PasteSpecial _
Paste:=xlPasteFormulas
End With

curRow, colcount and maxRow are all variables set
dynamically. This works but I get a message I have to
respond to that asks if I want to replace the contents in
the destination cell. Can I turn that off?
 

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