#1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 7
Default filecopy Question

I want to use the filecopy statement to copy a list of files to another
folder. This list will be stored in a column on a spreadsheet and will
always be different. As such, if the filecopy function encounters an error
(like the file doesn't exist), I don't want it to stop the code, but rather
identify that cell on the spreadsheet and then move on to the next cell.

Does anyone know how to do this?
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 1,533
Default filecopy Question

Show us the code you have got so far!

Regards,
Per

"rjvega" skrev i meddelelsen
...
I want to use the filecopy statement to copy a list of files to another
folder. This list will be stored in a column on a spreadsheet and will
always be different. As such, if the filecopy function encounters an
error
(like the file doesn't exist), I don't want it to stop the code, but
rather
identify that cell on the spreadsheet and then move on to the next cell.

Does anyone know how to do this?


  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 11,123
Default filecopy Question

Hi rjvega

You can test with Dir if a file exist before you try to copy

If Dir(FileCell.Value) < "" Then
' do the copy
else
'do nothing
end if

See this page for more info
http://www.rondebruin.nl/exist.htm


Maybe this page is useful also if you want to copy files or folders
http://www.rondebruin.nl/folder.htm


--

Regards Ron de Bruin
http://www.rondebruin.nl/tips.htm


"rjvega" wrote in message ...
I want to use the filecopy statement to copy a list of files to another
folder. This list will be stored in a column on a spreadsheet and will
always be different. As such, if the filecopy function encounters an error
(like the file doesn't exist), I don't want it to stop the code, but rather
identify that cell on the spreadsheet and then move on to the next cell.

Does anyone know how to do this?

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
where can I see my question and answer? Yesterday I ask a question IP Excel Discussion (Misc queries) 2 May 10th 08 04:08 PM
Newbie Question - Subtraction Formula Question [email protected] Excel Discussion (Misc queries) 3 May 5th 06 05:50 PM
The question is an excel question that I need to figure out howto do in excel. Terry Excel Worksheet Functions 3 January 23rd 06 06:22 PM
Max and MIN question scott45 Excel Worksheet Functions 0 October 31st 05 07:50 PM
If / Then Question pknivens Excel Discussion (Misc queries) 2 October 12th 05 08:38 AM


All times are GMT +1. The time now is 04:48 PM.

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

About Us

"It's about Microsoft Excel"