Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 110
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,290
Default 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"
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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4,391
Default 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" 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



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 do I open an Excel file on XP system, saved on a Vista system JLS7 Excel Discussion (Misc queries) 3 December 2nd 08 04:21 AM
Close Excel server after activating OLE object Goofball Excel Discussion (Misc queries) 1 March 13th 08 05:32 PM
When i close a object 91 error shows. John Excel Programming 0 August 31st 04 04:55 AM
How to close embedded excel object? Al Excel Programming 0 May 3rd 04 06:06 PM
File System Object Neil Excel Programming 2 September 10th 03 05:01 PM


All times are GMT +1. The time now is 05:48 PM.

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

About Us

"It's about Microsoft Excel"