Code to delete an Excel File

R

Ray Clark

I must be missing something but I am having trouble trying to write a macro
to delete and Excel file. I have tried the following but does not work......
Application.Workbooks("N:\MaintCo-ord\Mech\Maint Day Roster for
Viewing.xls").Delete
Can anyone point me in the right direction.

Thanks
Ray
 
J

jaf

Ray,
The VB VBA command is KILL.

Kill "N:\MaintCo-ord\Mech\Maint Day Roster for Viewing.xls"

John
 
R

Ray Clark

John,

Thank you this was a great help as had not picked this up before. Much
appreciated.
Ray
 

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