ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Disable clipboard confirmation (https://www.excelbanter.com/excel-programming/377922-disable-clipboard-confirmation.html)

hmm

Disable clipboard confirmation
 
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)?



Tom Ogilvy

Disable clipboard confirmation
 
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

--
Regards,
Tom Ogilvy


"hmm" wrote:

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)?



hmm

Disable clipboard confirmation
 
Thanks Tom.

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

"Tom Ogilvy" wrote:

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

--
Regards,
Tom Ogilvy


"hmm" wrote:

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)?




All times are GMT +1. The time now is 01:49 AM.

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