Having a paste problem....

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have the following code snipet in a macro

xlSheet.Range("I10", xlSheet.Cells(xlSheet.Cells(11, 1) + 13, (5 * oldTestNum) + 8)).Selec
Selection.PasteSpecial Paste:=

xlSheet.Range("I10").Selec
xlSheet.Past

The "Paste:=8" was done as a workaround for a bug that would not allow the original code to work on older versions of Excel (someone on this forum gave me the info). Now, the code works on all the systems we've tried it on, but it only works once. The second time this is executed in a sheet, I get a runtime error (1004)

Any ideas about why this is failing

Rick W.
 
Hi
Try clearing the clipboard between copies. This used to work for me
when I was pasting inside a loop. Don't ask me why!

You need Application.CutCopyMode = False

regards
Paul
 

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

Back
Top