Copy rows from another file

  • Thread starter Thread starter Secret Squirrel
  • Start date Start date
S

Secret Squirrel

I'm trying to copy and paste special (values) into my active file.
The # of rows in this file will change so it won't be static all the time.
Can anyone point me in the right direction on how to set this up in vba?
 
Hi,

Here's a start

Sub CopyRows()
Selection.Copy Workbooks("myTarget.xls").Sheets("Sheet1").Range("A1")
End Sub

With this you copy the current selection and send it to the file
myTarget.xls, which is open, starting in A1 of Sheet1. Modify as needed.
 
Back
Top