View Full Version : Delete an excel file


exon
06-14-2010, 11:18 PM
I need to create a macro to delete an excel file on the disc (delete c:\order.xls).
Any suggestion please?

JamesMcS
06-15-2010, 12:15 AM
There's a VBA function called Kill which deletes files. You could save that as a module then call it from your macro.

exon
06-15-2010, 12:19 AM
There's a VBA function called Kill which deletes files. You could save that as a module then call it from your macro.

Thank you for your reply.
Could you give me an example VBA how to use this function please?

JamesMcS
06-15-2010, 12:20 AM
Have a look in the help file buddy, it'll give you the correct syntax.

exon
06-15-2010, 12:22 AM
Thank you.
Have a nice day.

JamesMcS
06-15-2010, 12:49 AM
Same to you!