View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.misc
Dave O
 
Posts: n/a
Default Appending data from one spreadsheet to another using a macro

This worked for me: assume you have two files open concurrently, one
called Source.xls and the other called Target.xls. Enter the word
"stop" (no quotes) at the bottom of the rows in the Source spreadsheet,
and run this code while the Source.xls sprdsht is in the active window:

Sub CopyRows()

Do Until ActiveCell.Value = "stop"
Selection.EntireRow.Copy
Windows("target.xls").Activate
ActiveSheet.Paste
ActiveCell.Offset(1, 0).Select
Windows("source.xls").Activate
ActiveCell.Offset(1, 0).Select
Loop


End Sub