View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Gary''s Student Gary''s Student is offline
external usenet poster
 
Posts: 11,058
Default Writing Cell info to a new Excel file

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