![]() |
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? |
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? |
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? |
All times are GMT +1. The time now is 08:57 PM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com