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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top