Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 23
Default COPY EXCEL FILE


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!
  #2   Report Post  
Posted to microsoft.public.excel.programming
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!



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 23
Default COPY EXCEL FILE


Thanks much Mr.Ogilvy for showing me magic!
keep enjoying life! myrna


*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
How to copy 2007 excel file formula results into a 2003 Excel file Nuria Alba de Luz Excel Discussion (Misc queries) 2 July 10th 09 01:48 PM
How do I copy a excel file into a InDesign file correctly? cfb Excel Discussion (Misc queries) 2 June 14th 07 10:08 PM
Copy from one excel file to another Gus[_2_] Excel Discussion (Misc queries) 1 April 25th 07 07:41 PM
how to copy Excel file on to a web site? drace19 New Users to Excel 3 June 12th 06 08:32 PM
EXCEL FILE a copy/a copy/a copy ....filename ve New Users to Excel 1 September 29th 05 09:12 PM


All times are GMT +1. The time now is 05:49 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"