![]() |
|
|
||||||||
| Site Links |
| Consulting |
| Knowledge Base |
| Training |
| Forum |
| Articles |
| Resources |
| Products |
| Cool Tools |
| Contact |
| About Us |
| Go to Page... |
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
|
When to Use "Application.CutCopyMode" Statement
Will someone give me a short tutorial about when to use the statement "Application.CutCopyMode = "? It would seem that maybe it should be a standard statement at the end of most macros that do any copying, but I'm just guessing.
|
|
Local Time: 05:23 AM
Local Date: 05-18-2013 Location:
|
|
|
|
#2 |
|
Site Admin
|
I don't know about tutorial as i'm no guru but here goes:
this first copy 'n' paste is how you would expect to perform the action manually, i.e all the clicks or keystrokes VBA:
VBA tags courtesy of www.thecodenet.com
VBA:
VBA tags courtesy of www.thecodenet.com
VBA:
VBA tags courtesy of www.thecodenet.com
VBA:
VBA tags courtesy of www.thecodenet.com
I may not be dead accurate with the explanation and someone may put me right but its as near as damn it! Regards, Simon Please read this before cross posting! In the unlikely event you didn't get your answer here try Microsoft Office Discussion @ The Code Cage If I have seen further it is by standing on the shoulders of giants. Isaac Newton, Letter to Robert Hooke, February 5, 1675 English mathematician & physicist (1642 - 1727) |
|
Local Time: 02:23 PM
Local Date: 05-18-2013 Location:
|
|
|
|
#3 |
|
|
Cyberdude
There might not be any need to use it anywhere. It really depends what you are doing. If you are using Paste or PasteSpecial then you probably should be using it. |
|
Local Time: 02:23 PM
Local Date: 05-18-2013 Location:
|
|
|
|
#4 |
|
|
Thanx for the reply, Simon. Basically, one might say that if you have done a lot of copying in your macro, then you can clear all the memory used by the copy operations by executing CutCopyMode. If copying just small amounts, then there's no real advantage to using CutCopyMode.
Can I assume that CutCopyMode is essentially useless if no copying has been done in the macro? I mean, is it strictly related to copying processes and no others? |
|
Local Time: 05:23 AM
Local Date: 05-18-2013 Location:
|
|
|
|
#5 |
|
Site Admin
|
Purely copying!
Regards, Simon Please read this before cross posting! In the unlikely event you didn't get your answer here try Microsoft Office Discussion @ The Code Cage If I have seen further it is by standing on the shoulders of giants. Isaac Newton, Letter to Robert Hooke, February 5, 1675 English mathematician & physicist (1642 - 1727) |
|
Local Time: 02:23 PM
Local Date: 05-18-2013 Location:
|
|
|
|
#6 |
|
|
There is one ultra obscure reason to check that you cleared the clipboard, but I don?t have the example anymore.
Anybody that has John Walkenbach?s aka J-Walks Pup2000 (old) AddIn with source code can see this. He used a logo that did not clear the clipboard (how it got there is the bug) if you loaded the right-click menu shortcuts. I don?t have it on me but I did email J-Walk about this issue and he told me how to fix it (I was so in awe of him at the time). |
|
Local Time: 09:23 AM
Local Date: 05-18-2013 Location:
|
|
|
|
#7 |
|
Administrator
VP-Knowledge Base |
I would use it even after small "copies" to avoid unexpected results.
MVP (Excel 2008-2010) "Provide sample data and layout if you want a quicker solution." - MD To help indent your macros try Smart Indent Please remember to mark threads 'Solved' |
|
Local Time: 02:23 PM
Local Date: 05-18-2013 Location:
|
|
![]() |
| Display Modes |
Linear Mode |
Switch to Hybrid Mode |
Switch to Threaded Mode |
|
|


