Copying static cells in a loop....Paste Special problems

K

knox5731

Here is my query:
' Detail Machine Code, PCI, and Agreement type Column
'Set ws1 = Worksheets("Calc")
'Set ws2 = Worksheets("Generator")
Dim lastrowDMC As Long
Dim rDMC As Long, rrDMC As Long
rrDMC = 14
Dim DMC As Long
DMC = Range("I11").Copy
With ws2
lastrowDMC = .Cells(Rows.Count, "B").End(xlUp).Row
For rDMC = 14 To lastrowDMC
Range("I11").Select
Selection.Copy
ws2.Cells(rrDMC, "C") = Selection.PasteSpecial '_
'Paste:=xlPasteValues, Operation:=xlNone,
SkipBlanks:=False, Transpose:=False

rrDMC = rrDMC + 1
Next rDMC
End With


It is supposed to take the cell I11, and copy it, adn then paste it in
a loop to the column C starting at row 14, and then going down the
column to the last row I counted....However, I can't get it to do a
pastespecial..it keeps putting a value of "true" in the cells since I11
is a formula. I get a syntax error if I uncomment the
Paste:x1PasteValues.. line. Help?
 
D

Dave Peterson

You have replies at your other post.

Here is my query:
' Detail Machine Code, PCI, and Agreement type Column
'Set ws1 = Worksheets("Calc")
'Set ws2 = Worksheets("Generator")
Dim lastrowDMC As Long
Dim rDMC As Long, rrDMC As Long
rrDMC = 14
Dim DMC As Long
DMC = Range("I11").Copy
With ws2
lastrowDMC = .Cells(Rows.Count, "B").End(xlUp).Row
For rDMC = 14 To lastrowDMC
Range("I11").Select
Selection.Copy
ws2.Cells(rrDMC, "C") = Selection.PasteSpecial '_
'Paste:=xlPasteValues, Operation:=xlNone,
SkipBlanks:=False, Transpose:=False

rrDMC = rrDMC + 1
Next rDMC
End With

It is supposed to take the cell I11, and copy it, adn then paste it in
a loop to the column C starting at row 14, and then going down the
column to the last row I counted....However, I can't get it to do a
pastespecial..it keeps putting a value of "true" in the cells since I11
is a formula. I get a syntax error if I uncomment the
Paste:x1PasteValues.. line. Help?
 

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