MrExcel Publishing
Your One Stop for Excel Tips & Solutions

Deleting the clipboard contents!!!

Posted by SWallace on December 20, 2001 4:34 AM

Here's my problem. I've gotten together a really useful Macro to open all workbooks in a dir and copy out the relevant cells pasting them in succession into
the new workbook so I can work with the figures there.
however when I get the macro to close files when its finished I get the message box " there is a large amount of info on the clipboard......" after each file is sent the close command , which stops the macro until the box is clicked. Does anyone know how I can prevent this ?

Cheers in advance

Posted by paul on December 20, 2001 4:44 AM

Heres a possible solution:
Just finish off the macro with a command that tells it to copy a single charachter to the clip board stored in a cell e.g. put a letter x in a cell out of the way somewhere and finish the macro with


That way it won't think it's got a large content??

Posted by Apemantus on December 20, 2001 6:16 AM


Posted by Mark O'Brien on December 20, 2001 9:41 AM

You could put this code before the macro:

Application.DisplayAlerts = False

Posted by Diomedes on December 20, 2001 3:27 PM

Hmmm ....... here is the complete revelation ......

All is revealed at MS Knowledge Base (Article #Q287392) :-;EN-US;Q287392