After you paste the data and before you close the workbook, can you copy say....cell A1 of a particular workbook, so that the data on the clipboard isn't large enough to warrant the message? It's cheesy and inefficient, but will probably work.
Need some help here... I have some code to open up another workbook, take the data from sheet1 in it, copy it to a sheet in the first book, and then close the opened workbook. My problem is that whenever it closes the workbook it gives me the large amount of data on clipboard window that I must then click 'No' on before it will proceed. I thought that making CutCopyMode = False would fix that, but it hasnt worked. Heres the bit of code that does this:
VB:CutCopyMode = False Workbooks.Open Filename:= _ "G:\Inventory\Inventory.xls" Range("A1:M500").Select Selection.Copy Windows("Inventory Report.xls").Activate Sheets("Vis-W").Select Cells.Select ActiveSheet.Paste Range("A1").Select Windows("Inventory.xls").Activate CutCopyMode = False ActiveWindow.Close Sheets("Main").Select
After you paste the data and before you close the workbook, can you copy say....cell A1 of a particular workbook, so that the data on the clipboard isn't large enough to warrant the message? It's cheesy and inefficient, but will probably work.
Hello,
How about:
instead ofVB:Application.CutCopyMode = False
hthVB:CutCopyMode = False
JL
Mav - its dirty and ugly, but it works, cant believe I didnt think of it! Thanks!
I prefer jlsprink's solution.
Yup. I'm the king of duct taping a project together.
![]()
I would also recommend jlsprink's method.
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks