Copy from CSV
I recorded this macro
Workbooks.Open Filename:="Mypath\myfile.csv"
Range("B3:Y3").Select
Selection.Copy
Windows("MyOtherFile").Activate
Range("B5").Select
ActiveSheet.Paste
When I activate the code it works but when I copy it into another module I get
Application-defined or Object-defined error . The only difference is that
the 2 files are not in the same directory.
"Thanks" wrote:
Hello
I am trying to open a CSV file and copy portions from it. I would like to
open
\\mypath\myfile.csv then copy B3:Y3 to my other file sheet1 B5:Y5.
Could someone please help?
|