COPY EXCEL FILE

M

Myrna Rodriguez

How can I copy an excel file a folder??
The folder is named accordingly to an excel cell.value.
This folder is created using a macro.

I tried this code:
FileCopy "S:\Order Folders\QA.xls", "S:\Order Folders\2004 Open
Orders\04_ & cell.Value\QA.xls"

The problem I am debugging is designating the path
04_ & cell.Value. Cell.Value will always be different depending what the
user types in the excel cell.

This is my file folder sequence in the S: drive
Order Folders
2004 Open Orders
04_XXX (I will the have the file QA.xls in this folder)

Thanks much for your help & continue to enjoy life!!
Myrna



*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
 
T

Tom Ogilvy

FileCopy "S:\Order Folders\QA.xls", _
"S:\Order Folders\2004 Open Orders\04_" & _
format(cell.Value,"000") _
& "\QA.xls"

or just cell.value. Depends on what the format of the file name is.

FileCopy "S:\Order Folders\QA.xls", _
"S:\Order Folders\2004 Open Orders\04_" & _
cell.Value _
& "\QA.xls"
 

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

Top