Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi, wonder if someone can help.
I need to write information from various cells in one file (not in any particular order) to another file. The examples I have seen do not show quite what I want and when i try to adapt them, it doesn't work. I can open a file but writiig the information seems to be the problem. Can you please help? Thanks Steve |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Say we have two existing files book1.xls and Book3.xls. We want to copy a
cell from someplace in book1 and paste it to somewhere in Book3. We open both the source and destination book and do the copy/paste. Sub Macro1() ChDir "C:\test folder" Workbooks.Open Filename:="C:\test folder\book1.xls" Workbooks.Open Filename:="C:\test folder\Book3.xls" Windows("book1.xls").Activate Range("F4").Select Selection.Copy Windows("Book3.xls").Activate Range("A20").Select ActiveSheet.Paste End Sub -- Gary''s Student - gsnu200856 "Steve" wrote: Hi, wonder if someone can help. I need to write information from various cells in one file (not in any particular order) to another file. The examples I have seen do not show quite what I want and when i try to adapt them, it doesn't work. I can open a file but writiig the information seems to be the problem. Can you please help? Thanks Steve |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Thanks Gary, works a treat.
I don't supose there is anway you can write to a file without opening it is there? "Gary''s Student" wrote: Say we have two existing files book1.xls and Book3.xls. We want to copy a cell from someplace in book1 and paste it to somewhere in Book3. We open both the source and destination book and do the copy/paste. Sub Macro1() ChDir "C:\test folder" Workbooks.Open Filename:="C:\test folder\book1.xls" Workbooks.Open Filename:="C:\test folder\Book3.xls" Windows("book1.xls").Activate Range("F4").Select Selection.Copy Windows("Book3.xls").Activate Range("A20").Select ActiveSheet.Paste End Sub -- Gary''s Student - gsnu200856 "Steve" wrote: Hi, wonder if someone can help. I need to write information from various cells in one file (not in any particular order) to another file. The examples I have seen do not show quite what I want and when i try to adapt them, it doesn't work. I can open a file but writiig the information seems to be the problem. Can you please help? Thanks Steve |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Writing excel info into MS Word | Excel Programming | |||
Writing excel info into MS Word | Excel Programming | |||
Writing functions to prompt for info | Excel Worksheet Functions | |||
Writing Macro for extracting info from other softwares | Excel Discussion (Misc queries) | |||
Writing directory info to individual cells | Excel Programming |