Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 142
Default Problem inserting cut range

I'm trying to cut a range then insert the cut range at a particular location.
The code looks like this:

Range("F5:G" & ActiveSheet.UsedRange.Rows.Count).Cut
Range("D5").Insert(xlShiftToRight)

However, when it reaches this point, I get an error saying "Cut method of
Range class failed". I've tried changing the destination range so that it
reads similar to the origin range, but that didn't help. Can someone help me
get the syntax on this line correct? I've got several similar lines further
down in the code. If I can fix this line, I'll be able to fix them all.

Thanks.
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 489
Default Problem inserting cut range

Post the rest of your code so we can help you. That snipet of code worked
for me.
--
Cheers,
Ryan


"Luke" wrote:

I'm trying to cut a range then insert the cut range at a particular location.
The code looks like this:

Range("F5:G" & ActiveSheet.UsedRange.Rows.Count).Cut
Range("D5").Insert(xlShiftToRight)

However, when it reaches this point, I get an error saying "Cut method of
Range class failed". I've tried changing the destination range so that it
reads similar to the origin range, but that didn't help. Can someone help me
get the syntax on this line correct? I've got several similar lines further
down in the code. If I can fix this line, I'll be able to fix them all.

Thanks.

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 142
Default Problem inserting cut range

I'll have to get it on Monday (Feb 8) since the code's on my machine at work.
I copy/pasted the code from my machine to here, however, so it doesn't look
exactly like it did in the editor. The code is actually all one line, with a
space between "Cut" and the second "Range". If it still works for you as one
line, I'll post the entire code (that I have so far) on Monday.

Thanks.

"Ryan H" wrote:

Post the rest of your code so we can help you. That snipet of code worked
for me.
--
Cheers,
Ryan


"Luke" wrote:

I'm trying to cut a range then insert the cut range at a particular location.
The code looks like this:

Range("F5:G" & ActiveSheet.UsedRange.Rows.Count).Cut
Range("D5").Insert(xlShiftToRight)

However, when it reaches this point, I get an error saying "Cut method of
Range class failed". I've tried changing the destination range so that it
reads similar to the origin range, but that didn't help. Can someone help me
get the syntax on this line correct? I've got several similar lines further
down in the code. If I can fix this line, I'll be able to fix them all.

Thanks.

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
Problem in inserting rows Amol Excel Discussion (Misc queries) 1 October 24th 09 07:36 AM
Problem of Inserting worksheet jwang036 Excel Programming 3 July 14th 08 07:32 AM
Excel automation: Problem with inserting an array of formulas into a range [email protected] Excel Programming 0 September 18th 07 10:43 PM
little problem with inserting a formula furbiuzzu Excel Programming 7 May 3rd 06 01:05 PM
Sorting and inserting problem Vlad[_5_] Excel Programming 7 August 31st 04 06:44 PM


All times are GMT +1. The time now is 01:11 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"