What exactly is the function of Application.CutCopyMode property in Excel

Saikat picture Saikat · Jul 12, 2013 · Viewed 128.6k times · Source

Well first of all I found couple of answers while googling but most of the forums are blocked in my Office Network hence asking this question here! One more intention is to get an answer in plain English :P

I understand if we set Application.CutCopyMode = False then the Copied/Cut results will be vanished (i.e. memory will be cleared) but when should we use this and when not to use this? Can anyone please help?

Answer

user2230817 picture user2230817 · Jul 12, 2013

By referring this(http://www.excelforum.com/excel-programming-vba-macros/867665-application-cutcopymode-false.html) link the answer is as below:

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.