DeleteFile Method

D

don

I have a db IV file passed to Excel from Approach.
I need to delete the file once I have copied the data into excel.

Excel Help says:

object.DeleteFile filespec[, force]

object Required. Always the name of a FileSystemObject.

I have no idea what the FileSystemObject would be.

Any help would be appreciated.

Thanks
Don
 
J

Jim Cone

Don,

You got into the help file for the Microsoft Scripting Runtime.
Its script works seamlessly with Excel.
However, using VBA the "Kill" statement will remove a file.
It cannot be used to delete an open file.
The syntax is very simple...

Kill "MyFileName.xls"

Note: do not use a wild card character in the file name as you
could delete every xls file in the folder.
--
Jim Cone
San Francisco, USA
http://www.realezsites.com/bus/primitivesoftware


"don" <[email protected]>
wrote in message
I have a db IV file passed to Excel from Approach.
I need to delete the file once I have copied the data into excel.

Excel Help says:

object.DeleteFile filespec[, force]

object Required. Always the name of a FileSystemObject.

I have no idea what the FileSystemObject would be.

Any help would be appreciated.

Thanks
Don
 

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

Similar Threads

object.DeleteFile 2
File Exists 2
Deleting a file via a macro 5
FileSystemObject 2
Macro to open all files in SharePoint Library 1
testing file availablity 1
Add data at top of text file 1
FSO question 1

Top