code to delete a file

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

one of my macro generates an output file by the name of SimRes.xls in the
following path
D:\~Pradip\~My Documents\2_Personal\RSI\FINAL\simulation results\SimRes.xls
every time i run the code, excel prompts that file by that name already
exists, do i want to delete it.
is it possible to delete the workbook through some code.

thanks
pradip
 
how do i specify the path of the file.
the code i am writing is in file names RSIfinal.xls which is in the
following location:
D:\~Pradip\~My Documents\2_Personal\RSI\FINAL\RSIfinal.xls

the file i want to delete is the following:
D:\~Pradip\~My Documents\2_Personal\RSI\FINAL\simulation results\SimRes.xls

what code would i write in the file RSIfinal.xls

thanks
pradip
 

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

Back
Top