Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 410
Default What is wrong with this code?

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
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 897
Default What is wrong with this code?

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,xlPaste SpecialOperationNone,false,false)

if you need two lines.


HTH,
JP


On Jan 9, 11:48*am, jlclyde wrote:
* *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


  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 10,593
Default What is wrong with this code?

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)



"jlclyde" wrote in message
...
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



  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 410
Default What is wrong with this code?

On Jan 9, 10:53*am, JP wrote:
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,xlPaste SpecialOperationNone,fals*e,false)

if you need two lines.

HTH,
JP

On Jan 9, 11:48*am, jlclyde wrote:



* *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- Hide quoted text -


- 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
  #5   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 2,819
Default What is wrong with this code?



jlclyde wrote:

On Jan 9, 10:53 am, JP wrote:

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,xlPas teSpecialOperationNone,fals*e,false)

if you need two lines.

HTH,
JP

On Jan 9, 11:48 am, jlclyde wrote:




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- Hide quoted text -


- 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


Enjoy
http://www.candystand.com/



  #6   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 897
Default What is wrong with this code?

Glad it worked!

--JP

On Jan 9, 11:58*am, jlclyde wrote:

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

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
What is wrong with this vba piece of code? Jo[_2_] Excel Discussion (Misc queries) 4 October 4th 07 05:01 PM
What is wrong with the code? Eric Excel Discussion (Misc queries) 2 September 13th 07 10:36 AM
Add chart - what is wrong with the code? tskogstrom Charts and Charting in Excel 3 October 24th 06 05:22 PM
Can someone tell me what is wrong with this code? Ant Excel Discussion (Misc queries) 8 November 14th 05 02:53 PM
What's wrong with my code ? christophe meresse Excel Worksheet Functions 3 August 2nd 05 05:09 PM


All times are GMT +1. The time now is 10:40 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"