Link to home
Start Free TrialLog in
Avatar of Seamus2626
Seamus2626Flag for Ireland

asked on

Select .CSV file

Hi,

Im looking to copy over some data from one file to another, i cant use workbook.activate("XYZ.xls") because the file name changes each day, i donr want to use activate next workbook as the user may have multiple workbooks open.

Can i select the workbook to paste into based the on the fact it finishes .CSV as opposed to .xls

So something like

select.'code'
Copy entire workbook
Select "xyz.xls"
Paste into sheet "abc"

Select CSV file
Close
Dont save changes

Thanks!
Seamus
ASKER CERTIFIED SOLUTION
Avatar of nutsch
nutsch
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Seamus2626

ASKER

Thanks Thomas!
Glad to help. One warning: this will take the first csv workbook found, which could be an issue if you have more than one open.

T
Thats fine, will only ever have one.

Cheers,
Seamus