# Microsoft Office Application Help - Excel Help forum > Excel Programming / VBA / Macros >  > [SOLVED] Application.CutCopyMode=False

## Jiptastic

When I use the macro recorder this code (in title) comes up frequently.  I have deleting all unnecessary code and have been deleting this thinking that it was a default setting which was unnecessary.  Am I correct in this assumption?  Is there a list that anyone has compiled of the most common coding that can be eliminated when cleaning up?

----------


## Chippy

Application.CutCopyMode=False is seen in macro recorder-generated code when you do a copy/cut cells and paste .  The macro recorder does the copy/cut and paste in separate statements and uses the clipboard as an intermediate buffer.   I think Application.CutCopyMode = False clears the clipboard.  Without that line you will get the warning 'There is a large amount of information on the Clipboard....' when you close the workbook with a large amount of data on the clipboard.

With optimised VBA code you can usually do the copy/cut and paste operations in one statement, so the clipboard isn't used and Application.CutCopyMode = False isn't needed and you won't get the warning.

For optimising macro recorder-generated code you can merge adjacent Select and Selection statements and refer directly to sheets and ranges.

Macro recorder code:



```
Please Login or Register  to view this content.
```


Optimised version:



```
Please Login or Register  to view this content.
```

----------


## Jiptastic

Brilliant Chippy.  Great explanation.

----------


## sergeyweiss

Chippy gave an alternative to copy ranges. Though, some objects have no destination in COPY method. Example: ChartObject Object. Copy method does one thing only - it copies to a Clipboard. Therefore, if you do copy chart (as a template, for example) from one sheet to another and do it frequently in one session, you still have to clear Clipboard with Application.CutCopyMode = False after ActiveSheet.Paste method.

----------


## mohadin

well
I gus using this method would be ok
 Range("A1:C5").Cut Destination:=Sheet2.Range("h1")

----------


## mohadin

well
I gus using this method would be ok
 Range("A1:C5").Cut Destination:=Sheet2.Range("h1")

----------


## WillDM73

I've been using Application.GoTo to attempt to speed up the process of moving data around in a workbook, but it sounds like the optimized version below is even better. What are the pro's and con's of using the optimized version below versus using the following?




```
Please Login or Register  to view this content.
```


Also, how do I reference a worksheet using the optimized code? I was able to successfully add the worksheet to the optimized code, but I'm struggling to add the workbook as well. IE:




```
Please Login or Register  to view this content.
```






> Application.CutCopyMode=False is seen in macro recorder-generated code when you do a copy/cut cells and paste .  The macro recorder does the copy/cut and paste in separate statements and uses the clipboard as an intermediate buffer.   I think Application.CutCopyMode = False clears the clipboard.  Without that line you will get the warning 'There is a large amount of information on the Clipboard....' when you close the workbook with a large amount of data on the clipboard.
> 
> With optimised VBA code you can usually do the copy/cut and paste operations in one statement, so the clipboard isn't used and Application.CutCopyMode = False isn't needed and you won't get the warning.
> 
> For optimising macro recorder-generated code you can merge adjacent Select and Selection statements and refer directly to sheets and ranges.
> 
> Macro recorder code:
> 
> 
> ...

----------


## jolivanes

@WillDM73
This is from a recent post where data is copied between workbooks that are both open.
I am sure you can go through it and get an idea of what you asked for.




```
Please Login or Register  to view this content.
```

----------

