PC Review


Reply
Thread Tools Rate Thread

Code to delete an Excel File

 
 
Ray Clark
Guest
Posts: n/a
 
      19th Jun 2008
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 With Quote
 
 
 
 
jaf
Guest
Posts: n/a
 
      19th Jun 2008
Ray,
The VB VBA command is KILL.

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

John

"Ray Clark" <(E-Mail Removed)> wrote in message
news:785D1E70-F112-4932-B79A-(E-Mail Removed)...
>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 With Quote
 
Ray Clark
Guest
Posts: n/a
 
      19th Jun 2008
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" <(E-Mail Removed)> wrote in message
> news:785D1E70-F112-4932-B79A-(E-Mail Removed)...
> >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 With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
delete a file in code =?Utf-8?B?YWlkYW4=?= Microsoft Excel Programming 3 3rd Nov 2006 11:25 PM
Delete data in a linked Excel sheet using Access code or seql delete Rocky Microsoft Access External Data 9 26th Jun 2005 12:42 AM
Import VBA Code in Excel-File ? (Export VBA Code to file) Matthias Pospiech Microsoft Excel Programming 2 22nd Mar 2005 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 =?Utf-8?B?c2lkZXdheXo=?= Microsoft Excel Programming 0 3rd Mar 2004 03:26 PM
delete a file with code giannis Microsoft Access External Data 3 22nd Oct 2003 02:42 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 01:56 PM.