+ Reply to Thread
Results 1 to 3 of 3

How do I close a file system object?

  1. #1
    Steph
    Guest

    How do I close a file system object?

    I have a file opened using a file system object in a macro. How do I close
    the file? file.close doesn't work.
    Thanks

  2. #2
    Jim Cone
    Guest

    Re: How do I close a file system object?

    Workbooks(file.Name).Close SaveChanges:=True
    --
    Jim Cone
    San Francisco, USA
    http://www.realezsites.com/bus/primitivesoftware


    "Steph" <[email protected]>
    wrote in message...
    I have a file opened using a file system object in a macro. How do I close
    the file? file.close doesn't work.
    Thanks

  3. #3
    NickHK
    Guest

    Re: How do I close a file system object?

    Steph,
    Not that I use the FSO in VBA (as I have never found a need for it), the
    ObjectBrowser indicates that the .OpenTextFile function returns a TextStream
    object.
    The TextStream object then has a .Close method.

    NickHK

    "Steph" <[email protected]> wrote in message
    news:[email protected]...
    > I have a file opened using a file system object in a macro. How do I close
    > the file? file.close doesn't work.
    > Thanks




+ 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