PDA

View Full Version : Solved: Deleting contents of clipboard



jungix
09-06-2006, 10:54 AM
Hi,

Just a simple question. When I copy and paste with a pastespecial in Excel it works well, but the original data that I copied remain selected at the end, and when I close the workbook I have a warning saying that the contents of the clipboard is too huge, and asking if I want to delete it. How could I do that in a macro, or be able to unselect the copied range?

Marcster
09-06-2006, 11:22 AM
This works, if I'm getting what you mean:
Application.CutCopyMode = False
Use this after you've done the the paste special thing.

Marcster.

CCkfm2000
09-06-2006, 11:13 PM
see this kb entry.

http://vbaexpress.com/kb/getarticle.php?kb_id=205

jungix
09-07-2006, 06:25 AM
Thanks to both of you.

Actually Marcster solution is enough for me here, but I'll remember the kb entry if I need it one day.

Marcster
09-07-2006, 10:10 AM
Glad to be able help :yes.

Marcster.

Zack Barresse
09-08-2006, 09:11 AM
Btw, there is a large difference between the Windows clipboard, and the Office clipboard (yes, there are two). The API call only affects the Windows clipboard. I don't know if there is a way to clear the Office clipboard. :dunno

Marcster
09-08-2006, 11:34 AM
.