cfdh_edmundo
Board Regular
- Joined
- Nov 9, 2005
- Messages
- 133
Hi,
I have a line of code as follows:
which works exactly as I want. I deletes all files in a temporary folder before running the rest of the macro.
The problem I have is when there are no files in the directory (i.e. it's an empty directory) then I get a "Run-time error '53': File not found" error.
Is there a neat way to put some simple error handling so the macro will just skip the line if there directory is empty?
Many thanks for any help,
Chris
I have a line of code as follows:
Code:
Kill tempPath & "*.*"
which works exactly as I want. I deletes all files in a temporary folder before running the rest of the macro.
The problem I have is when there are no files in the directory (i.e. it's an empty directory) then I get a "Run-time error '53': File not found" error.
Is there a neat way to put some simple error handling so the macro will just skip the line if there directory is empty?
Many thanks for any help,
Chris