ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Clipboard Event Handler? (https://www.excelbanter.com/excel-programming/357772-clipboard-event-handler.html)

[email protected]

Clipboard Event Handler?
 
Hi,

I'm creating a macro that basically opens up a bunch of spreadsheets,
copies the information, pastes it into a database and closes the
spreadsheets without saving them.


All of this is working fine - the problem I'm having is when my macro
attempts to close each open workbook I get a prompt message from the
Clipboard Event asking if I want to save the copied information on the
clipboard. I want to tell
my macro to tell this prompt "no" don't save the info, but am not sure
how to deal with a Clipboard Event Handler.


Anyone have any advice?


Thanks


JMB

Clipboard Event Handler?
 
After copying the information, try
Application.CutCopyMode = False

or, you can disable alerts before closing the workbooks
Application.DisplayAlerts = False

set it back to True afterwards.


" wrote:

Hi,

I'm creating a macro that basically opens up a bunch of spreadsheets,
copies the information, pastes it into a database and closes the
spreadsheets without saving them.


All of this is working fine - the problem I'm having is when my macro
attempts to close each open workbook I get a prompt message from the
Clipboard Event asking if I want to save the copied information on the
clipboard. I want to tell
my macro to tell this prompt "no" don't save the info, but am not sure
how to deal with a Clipboard Event Handler.


Anyone have any advice?


Thanks




All times are GMT +1. The time now is 10:00 PM.

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