Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 22
Default Code to delete an Excel File

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
  #2   Report Post  
Posted to microsoft.public.excel.misc
jaf jaf is offline
external usenet poster
 
Posts: 300
Default Code to delete an Excel File

Ray,
The VB VBA command is KILL.

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

John

"Ray Clark" wrote in message
...
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


  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 22
Default Code to delete an Excel File

John,

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

"jaf" wrote:

Ray,
The VB VBA command is KILL.

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

John

"Ray Clark" wrote in message
...
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



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
How to Open a file with the help of a code in Excel Pranay Shah New Users to Excel 3 August 22nd 07 02:42 PM
cannot delete excel file danflip Excel Discussion (Misc queries) 0 April 20th 07 04:20 PM
How to hide VB code from Excel file Anift Setting up and Configuration of Excel 3 December 19th 06 01:43 PM
Code to Open Excel File Please Help Cole Excel Discussion (Misc queries) 2 July 10th 06 09:04 PM
excel file deleted. Now howdo you delete file NAME NANMAC New Users to Excel 8 September 2nd 05 07:26 AM


All times are GMT +1. The time now is 11:31 PM.

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

About Us

"It's about Microsoft Excel"