Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Large Amount of Info on Clipboard
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 |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
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 |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Large Amount of Info on Clipboard
Thanks Dave. That works for me.
Bill ------------------- On 2/23/2010 10:48 AM, Dave Peterson wrote: 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 |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
How to disable "There is a large amount of data on the clipboard..." | Excel Discussion (Misc queries) | |||
Macros and large clipboard error | Excel Programming | |||
Large amount of info on the clipboard | Excel Discussion (Misc queries) | |||
Sum of Totals from a large amount of Info + colour presentation | Excel Programming | |||
Sum of Totals from a large amount of Info + colour presentation | Excel Programming |