I am creating a program that opens an excel file on the network, copies data from a worksheet from that workbook on to ThisWorkbook and then closes the workbook on the network.
Everything seems to work fine except that when I close the workbook on the network, it displays a message asking if I want to leave the data on the clipboard for future use.
What code do I need to avoid getting this message? I would like to close the workbook without leaving anything in the clipboard, but I don't want the user to see this message.
Here's the code that opens the workbook and copies data.
Workbook.Activate FileName
Worksheets("Input").Activate
Range("C1:F103").Copy
ThisWorkbook.Activate
Worksheets("PASTE TIP SHEET HERE").Select
Range("C1:F103").Select
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
Workbooks(FileName).Close SaveChanges:=False
I am sure there is probably a more efficient way to do this and avoid getting the message.
Thanks for any help I can get.
modytrane
Bookmarks