clipboard info

L

Lee S.

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.
 
J

JohnI in Brisbane

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top