+ Reply to Thread
Results 1 to 3 of 3

DeleteFile Method

  1. #1
    don
    Guest

    DeleteFile Method

    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

  2. #2
    Jim Cone
    Guest

    Re: DeleteFile Method

    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

  3. #3
    don
    Guest

    Re: DeleteFile Method

    Thanks jim, works great.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1