Large Amount of Info on Clipboard
Try:
application.cutcopymode = false
activewindow.close savechanges:=false
(I'd use a variable for the workbook. I don't trust the windows collection.)
application.cutcopymode = false
activeworkbook.close savechanges:=false
'or
wkbk.close savechanges:=false
Bill Martin wrote:
Using Excel 2003 I recorded a macro that opens a second file, copies a large
amount of data from it that gets pasted into the original file, then closes this
second file. I've used this code as a base to do what I actually want.
My problem is when the code closes the second file with:
ActiveWindow.Close Savechanges:=False
At that point Excel comes to a halt with a message window telling me that
there's a large amount of data on the clipboard, and do I want to save it? How
do I get VBA to tell it 'no' without this message window coming up?
Thanks.
Bill
--
Dave Peterson
|