View Single Post
  #4   Report Post  
Posted to microsoft.public.excel.programming
Patrick Molloy Patrick Molloy is offline
external usenet poster
 
Posts: 1,049
Default Problem With A Pesky Question during a Macro

don't activate the table.csv workbook

Sub CopyTable

Windows("table.csv").Range("A1:G486").Copy
Range("W6").Paste
Application.CutCopyMode = False
workbooks("table.csv").Close False

End Sub



"Paul" wrote in message
...
When running the below macro I get a dialog box asking if I want to keep &
use the data on the clipboard, which of course I do since I am pasting it
just a few lines down.
How can I keep this from happening?

Sub Ctable.csvopyTable

Windows("").Activate
Range("A1:G486").Select
Selection.Copy
ActiveWorkbook.Close
Range("W6").Select
ActiveSheet.Paste

End Sub