How do I delete an xls file using a .xl macro in a different file?

J

JHB

I have an application where I am importing data from an .xls
file,manipulating it and saving it in a different file. From the
second file I need to create a macro that will delete the original
file! I need to do this because there is a seperate application
creating the feeder file, and if I create more than opne file it gets
stored with the count after it as in:

Feeder.xls
Feeder(1).xls
Feeder(2).xls etc

I know exactly where the file will be (in what folder and drive), I
just dont have a clue as to how to write a macro to remove it. I am
using Excel 2000.

Thanks in advance

John Baker
 
D

Dave Peterson

After you import the data, you can use Kill to delete the file.

Kill "x:\yourpathtothefile\feeder.xls"
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top