Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 25
Default code to delete a file

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
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 703
Default code to delete a file

Kill "<filename"

"Pradip Jain" wrote:

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

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 25
Default code to delete a file

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


"Charlie" wrote:

Kill "<filename"

"Pradip Jain" wrote:

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

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 111
Default code to delete a file

Look up the word Kill in help

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
code to delete module / macro in another file Ray Clark[_2_] Excel Discussion (Misc queries) 1 July 3rd 08 04:15 AM
Code to delete an Excel File Ray Clark[_2_] Excel Discussion (Misc queries) 2 June 19th 08 11:22 PM
Import VBA Code in Excel-File ? (Export VBA Code to file) Matthias Pospiech Excel Programming 2 March 22nd 05 04:56 PM
i need help making code that will open an Xml file for Excel in VB.NET and delete tables that i don't want to show up sidewayz Excel Programming 0 March 3rd 04 03:26 PM
VBA code delete code but ask for password and unlock VBA protection WashoeJeff Excel Programming 0 January 27th 04 07:07 AM


All times are GMT +1. The time now is 08:53 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"