Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
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
Posted to microsoft.public.excel.programming
|
|||
|
|||
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
Posted to microsoft.public.excel.programming
|
|||
|
|||
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
Posted to microsoft.public.excel.programming
|
|||
|
|||
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
Posted to microsoft.public.excel.programming
|
|||
|
|||
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
Posted to microsoft.public.excel.programming
|
|||
|
|||
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 |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Macro recorded... tabs & file names changed, macro hangs | Excel Worksheet Functions | |||
Macro Help Needed - Excel 2007 - Print Macro with Auto Sort | Excel Worksheet Functions | |||
how to count/sum by function/macro to get the number of record to do copy/paste in macro | Excel Programming | |||
macro to delete entire rows when column A is blank ...a quick macro | Excel Programming | |||
Start Macro / Stop Macro / Restart Macro | Excel Programming |