Closing Wookbook with items in clipboard

  • Thread starter Thread starter lance-news
  • Start date Start date
L

lance-news

I was trying to close a workbook the other day after copying some cells
from it. I kept getting a message

"There is a large amount of info in the clipboard, do you want to keep
it to be used by another program"

I always had to click "Yes" before the macro would proceed. Is there a
method to add to the .CLOSE command so that VBA knows to save the info
in the clipboard and doesn't have to ask me?

Lance
 
Application.CutCopyMode = False
will clear the clipboard so you don't get the prompt.
 
Tom Ogilvy said:
Application.CutCopyMode = False
will clear the clipboard so you don't get the prompt.

Hi, I think that the OP probably wants to keep the stuff on the clipboard.

Application.DisplayAlerts = False

This should turn off the alerts when you save files, and so on. I have never
tried it with a full clipboard. Does it disable the query there as well? If
so, is the effect to keep the stuff on the clipboard?

Just a thought.

Geoff
 
Your correct that is appears the OP does want to retain the data in the
clipboard.

I would assume application.DisplayAlerts will cause that to happen - I have
never had occasion to want to retain what is in the clipboard.

Depending on what is in there, the OP may be best advised to finish with the
clipboard before closing and then clearing the clipboard would be
appropriate.
 
Back
Top