ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   clipboard info (https://www.excelbanter.com/excel-programming/276904-clipboard-info.html)

Lee S.[_3_]

clipboard info
 
I want to close a file without saving it in my macro, but
it asks "whethere I want to keep the info in the
clipboard..." Can I do something in the macro to say "no"
or to avoid this message? Thanks.

JohnI in Brisbane

clipboard info
 
Lee,

This message gets displayed if there is still data in the clipboard from a
previous cut/copy.
It's a good habit to enter the following command after pasting (or whatever)
the data:-

Application.CutCopyMode = False

- to clear the clipboard. I've had some memory management problems when I
failed to do this.

If you still need the paste info. after closing, use:-

Application.DisplayAlerts = False
ActiveWorkbook.Close SaveChanges:=False
Application.DisplayAlerts = True

to prevent the message.

Personally I take the message as a warning that I've missed cleaning up
after a cut/copy.

regards,

JohnI

"Lee S." wrote in message
...
I want to close a file without saving it in my macro, but
it asks "whethere I want to keep the info in the
clipboard..." Can I do something in the macro to say "no"
or to avoid this message? Thanks.




[email protected]

clipboard info
 
After the paste :

Application.CutCopyMode =False

HTH
Paul
----------------------------------------------------------------

On Fri, 12 Sep 2003 15:04:59 -0700, "Lee S." wrote:

I want to close a file without saving it in my macro, but
it asks "whethere I want to keep the info in the
clipboard..." Can I do something in the macro to say "no"
or to avoid this message? Thanks.




All times are GMT +1. The time now is 10:09 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com