Disable clipboard confirmation

H

hmm

In closing a large file, Excel asks if you want to retain its contents in the
clipboard. This confirmation request even occurs when a macro closes the
file. What code do I use to disable this confirmation message (and proceed
to just close the file)?
 
T

Tom Ogilvy

Application.CutCopyMode = False

before you execute the command that causes the prompt will clear the
clipboard and prevent it.

or

Application.DisplayAlerts = False
' code that causes the prompt
Application.DisplayAlerts = True
 
H

hmm

Thanks Tom.

FYI, clearing the clipboard is faster execution than disabling display
alerts. My next step is to disable screen updating.
 

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