Deleting an Excel File

R

Ray Clark

I need to be able to write a macro to delete an Excel File and I have to be
missing something but nothing I try seems to work.
This is the last line of code I tried but........
Application.Workbooks("N:\MaintCo-ord\Mech\Maint Day Roster for
Viewing.xls").Delete

Hope someone can set me straight.

Thanks
Ray
 
B

Bob Greenblatt

I need to be able to write a macro to delete an Excel File and I have to be
missing something but nothing I try seems to work.
This is the last line of code I tried but........
Application.Workbooks("N:\MaintCo-ord\Mech\Maint Day Roster for
Viewing.xls").Delete

Hope someone can set me straight.

Thanks
Ray
If you really want to delete the file from the hard disk, use:
kill "n:\Maint.......
 

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