Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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 CopyTable Windows("table.csv").Activate Range("A1:G486").Select Selection.Copy ActiveWorkbook.Close Range("W6").Select ActiveSheet.Paste End Sub |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
After the copy, activate the "other" workbook and do the paste. Then close
"table.csv" -- Gary''s Student - gsnu200855 "Paul" wrote: 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 CopyTable Windows("table.csv").Activate Range("A1:G486").Select Selection.Copy ActiveWorkbook.Close Range("W6").Select ActiveSheet.Paste End Sub |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Sub copyToBk2nClose()
Dim copyFrom As Range, copyTo As Range Dim wksCopyTo As Worksheet Set ThisWB = ActiveWorkbook Set copyFrom = ThisWorkbook.Sheets("yourSheet").Range("A1:G486") 'change yourSheet Set wksCopyTo = Workbooks("Book2.xls").Sheets("Sheet1") 'change Book2 and Sheet1 Set copyTo = wksCopyTo.Range("W6") copyFrom.Copy wksCopyTo.Paste copyTo Application.CutCopyMode = False ThisWorkBook.Close End Sub -- Steve "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 CopyTable Windows("table.csv").Activate Range("A1:G486").Select Selection.Copy ActiveWorkbook.Close Range("W6").Select ActiveSheet.Paste End Sub |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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 |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Pesky spaces | Excel Discussion (Misc queries) | |||
Pesky VLookup !!! | Excel Worksheet Functions | |||
Pesky little problem with no solution? | Excel Worksheet Functions | |||
Pesky Autofilter Toggle | Excel Programming | |||
Pesky Ckeckboxes ! | Excel Programming |