What is wrong with this code?

  • Thread starter Thread starter jlclyde
  • Start date Start date
J

jlclyde

copy1.Range("A:A").Cut
copy1.Range("H:H").Paste
Application.CutCopyMode = False

When excel gets to the line of code about pasting it throws an error.
I was wondering if someone coupld enlighten me as to why?

Thanks,
Jay
 
Try this instead:

copy1.Range("A:A").Cut copy1.Range("H:H")

to do it all in one line, or

copy1.Range("H:H").PasteSpecial(xlPasteAll,xlPasteSpecialOperationNone,false,false)

if you need two lines.


HTH,
JP
 
copy1.Range("A:A").Cut copy1.Range("H1")
Application.CutCopyMode = False


--
---
HTH

Bob


(there's no email, no snail mail, but somewhere should be gmail in my addy)
 
Try this instead:

copy1.Range("A:A").Cut copy1.Range("H:H")

to do it all in one line, or

copy1.Range("H:H").PasteSpecial(xlPasteAll,xlPasteSpecialOperationNone,fals­e,false)

if you need two lines.

HTH,
JP





- Show quoted text -

Thanks. My brain is fried and I coudl not think of this. You are a
life saver, and not the little candies that you can't find anymore.
Jay
 

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