![]() |
Pasting in code and clipboard message
I have a spreadsheet with procedure that goes through all the files in a
particular path, copies a specific column out of each and pastes it in the new one. After copying and pasting, I close the source file, and get the message saying there is a large amount of data on the clipboard, do I want to save it. Once it is pasted, I don't need to save it on the clipboard. Is there a way of keeping this message from appearing with every copy & paste? The code is below, the line marked with the arrows is the one that triggers the clipboard message. Thanks. For Each flName In fls If UCase(Left(flName.Name, 1) = "D") Then strFileName = strPath & "\" & flName.Name xlSS1.Cells(2, intColCounter).Value = flName.Name Workbooks.Open Filename:=strFileName, updatelinks:=False Worksheets("S-S-1").Columns("B:B").Copy xlSS1.Cells(1, intColCounter).PasteSpecial xlPasteValues xlSS1.Cells(1, intColCounter).PasteSpecial xlPasteFormats == Workbooks(2).Close savechanges:=False <== intColCounter = intColCounter + 1 End If Next flName |
All times are GMT +1. The time now is 09:07 PM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com