Excel中的Application.CutCopyMode属性的功能究竟是什么 [英] What exactly is the function of Application.CutCopyMode property in Excel

查看:1805
本文介绍了Excel中的Application.CutCopyMode属性的功能究竟是什么的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

首先,我发现几个答案,而谷歌搜索,但大多数论坛被阻止在我的办公网络因此在这里提出这个问题!还有一个意图是用简单的英语得到答案:P



我明白如果我们设置 Application.CutCopyMode = False 然后复制/切割结果将消失(即内存将被清除),但是什么时候应该使用这个,何时不使用这个?有人可以帮忙吗?

解决方案

通过引用这个( http://www.excelforum.com/excel-programming-vba-macros/867665-application-cutcopymode-false.html )链接的答案如下:



Application.CutCopyMode = False 在宏记录器生成的代码中看到做一个复制/切割细胞和粘贴。宏记录器将复制/剪切并粘贴到单独的语句中,并将剪贴板用作中间缓冲区。我认为 Application.CutCopyMode = False 清除剪贴板。没有这一行,你会得到警告'剪贴板上有大量的信息....'当你关闭工作簿大量的数据在剪贴板。



使用优化的VBA代码,您通常可以在一个语句中进行复制/剪切和粘贴操作,因此剪贴板不被使用, Application.CutCopyMode = False 不需要,您将不会收到警告。


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?

解决方案

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.

这篇关于Excel中的Application.CutCopyMode属性的功能究竟是什么的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆