Connie,
Use
Application.CutCopyMode = False
after you paste
Alan
Connie wrote:
> I am using the following code to cut and paste data from a csv file
> into a sheet within a workbook. The problem is that when I close the
> csv file, I get prompted as to whether or not I want to save the
> contents of the clipboard as the clipboard contains a large amount of
> data. How do I clear the clipboard to avoid this prompt? Any help
> would be appreciated. Thanks!
>
> Connie
> ****************************************************************************************************************
> Set wkbk = ActiveWorkbook
> Set sh = Worksheets("Employee List")
> Set wb = Workbooks.Open(FileName:= _
> "C:\Documents and Settings\Connie Maldonado\My
> Documents\Mastec\Employee List\hourly employees.csv")
> wb.Worksheets(1).Cells.Copy
> wkbk.Worksheets("Employee List").Cells.PasteSpecial
> Paste:=xlPasteValues, _
> Operation:=xlNone, SkipBlanks:=False, Transpose:=False
> wb.Close savechanges:=False
|