Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 244
Default cut in macro

In my macro I try to move a certain range. The macro manages to select the
range but then when I try to cut the range and then paste it elsewhere the
code just fails. The code is:

qcRange.Select
Selection.Cut
Range("c10").Select
ActiveSheet.Paste

The range qcRange is accurate and as I said it gets selected. What is wrong
with the rest of the code? Please any help is very much appreciated!! Thanks!
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,327
Default cut in macro

The code says to paste in cell C10. If that isn't what you want then replace
C10 with something more suitable.

HTH. Best wishes Harald

"Arne Hegefors" skrev i melding
...
In my macro I try to move a certain range. The macro manages to select the
range but then when I try to cut the range and then paste it elsewhere the
code just fails. The code is:

qcRange.Select
Selection.Cut
Range("c10").Select
ActiveSheet.Paste

The range qcRange is accurate and as I said it gets selected. What is

wrong
with the rest of the code? Please any help is very much appreciated!!

Thanks!


  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 644
Default cut in macro

qcRange.Cut Range("C10") Works for me.

Die_Another_Day
"Arne Hegefors" wrote in message
...
In my macro I try to move a certain range. The macro manages to select the
range but then when I try to cut the range and then paste it elsewhere the
code just fails. The code is:

qcRange.Select
Selection.Cut
Range("c10").Select
ActiveSheet.Paste

The range qcRange is accurate and as I said it gets selected. What is
wrong
with the rest of the code? Please any help is very much appreciated!!
Thanks!



  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 244
Default cut in macro

Sorry but I must have been unclear. The problem is not where to paste it but
the fact that the code dies after having selected the range. After the line:

qcRange.Select

the code does not work. When walking through the code with F8 the program
just skipps the next lines....Please help me out if you know what is wrong!!!
Thanks!



"Harald Staff" skrev:

The code says to paste in cell C10. If that isn't what you want then replace
C10 with something more suitable.

HTH. Best wishes Harald

"Arne Hegefors" skrev i melding
...
In my macro I try to move a certain range. The macro manages to select the
range but then when I try to cut the range and then paste it elsewhere the
code just fails. The code is:

qcRange.Select
Selection.Cut
Range("c10").Select
ActiveSheet.Paste

The range qcRange is accurate and as I said it gets selected. What is

wrong
with the rest of the code? Please any help is very much appreciated!!

Thanks!



  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 244
Default cut in macro

Hi! Thanks for fast help but I cannot get it to work.. PÃ…erhaps there is some
problem that I declare the range like this:

Set qcRange = Range(firstDate.Address & ":" & segment.Offset(b, a).Address)

I then pass this range along in the code to different subs. However the
macro does select the right range so I cannot understand why it cannot
cut/paste..If anyone has any clue about this problem please help me out!
Thanks alot!!

"Die_Another_Day" skrev:

qcRange.Cut Range("C10") Works for me.

Die_Another_Day
"Arne Hegefors" wrote in message
...
In my macro I try to move a certain range. The macro manages to select the
range but then when I try to cut the range and then paste it elsewhere the
code just fails. The code is:

qcRange.Select
Selection.Cut
Range("c10").Select
ActiveSheet.Paste

The range qcRange is accurate and as I said it gets selected. What is
wrong
with the rest of the code? Please any help is very much appreciated!!
Thanks!






  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 644
Default cut in macro

What Error do you receive?
Die_A_D
Arne Hegefors wrote:
Hi! Thanks for fast help but I cannot get it to work.. PÅerhaps there is some
problem that I declare the range like this:

Set qcRange = Range(firstDate.Address & ":" & segment.Offset(b, a).Address)

I then pass this range along in the code to different subs. However the
macro does select the right range so I cannot understand why it cannot
cut/paste..If anyone has any clue about this problem please help me out!
Thanks alot!!

"Die_Another_Day" skrev:

qcRange.Cut Range("C10") Works for me.

Die_Another_Day
"Arne Hegefors" wrote in message
...
In my macro I try to move a certain range. The macro manages to select the
range but then when I try to cut the range and then paste it elsewhere the
code just fails. The code is:

qcRange.Select
Selection.Cut
Range("c10").Select
ActiveSheet.Paste

The range qcRange is accurate and as I said it gets selected. What is
wrong
with the rest of the code? Please any help is very much appreciated!!
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
Macro recorded... tabs & file names changed, macro hangs Steve Excel Worksheet Functions 3 October 30th 09 11:41 AM
Macro Help Needed - Excel 2007 - Print Macro with Auto Sort Gavin Excel Worksheet Functions 0 May 17th 07 01:20 PM
how to count/sum by function/macro to get the number of record to do copy/paste in macro tango Excel Programming 1 October 15th 04 01:16 PM
macro to delete entire rows when column A is blank ...a quick macro vikram Excel Programming 4 May 3rd 04 08:45 PM
Start Macro / Stop Macro / Restart Macro Pete[_13_] Excel Programming 2 November 21st 03 05:04 PM


All times are GMT +1. The time now is 05:47 PM.

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"