clipboard info

  • Thread starter Thread starter Lee S.
  • Start date Start date
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.
 
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
 
Back
Top