Thread: COPY EXCEL FILE
View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Tom Ogilvy Tom Ogilvy is offline
external usenet poster
 
Posts: 27,285
Default COPY EXCEL FILE

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"


--
Regards,
Tom Ogilvy

"Myrna Rodriguez" wrote in message
...

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!