esposit513
New Member
- Joined
- Nov 9, 2011
- Messages
- 5
I wrote code as part of an excel macro to delete all files in a folder but sometimes get an error if the folder is empty. how can i modify this to delete all files and not get an error
Kill "S:\Reporting Center*.pdf"
The macro repeats this line of code for about 15 different folders. When i first created the macro it worked fine but now it isn't. i get a debug error and i believe it is because the folder is empty. If the folder is empty i want the macro to just move on to the next line of code and empty the next folder.
Kill "S:\Reporting Center*.pdf"
The macro repeats this line of code for about 15 different folders. When i first created the macro it worked fine but now it isn't. i get a debug error and i believe it is because the folder is empty. If the folder is empty i want the macro to just move on to the next line of code and empty the next folder.