Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
XP XP is offline
external usenet poster
 
Posts: 389
Default Get file reference using File System Object

Hi,

I need to get a reference to a text file using the file system object; here
is what I have far:

Dim oFSO As Object
Dim oFile As Object
Set oFSO = CreateObject("Scripting.FileSystemObject")


Can someone please help me out with this and post what I still need using a
generic file path/filename?

Thanks

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,058
Default Get file reference using File System Object

see Bob Phillips's post:

http://groups.google.com/group/micro...o&rnum=1&hl=en
--
Gary''s Student - gsnu200821


"XP" wrote:

Hi,

I need to get a reference to a text file using the file system object; here
is what I have far:

Dim oFSO As Object
Dim oFile As Object
Set oFSO = CreateObject("Scripting.FileSystemObject")


Can someone please help me out with this and post what I still need using a
generic file path/filename?

Thanks

  #3   Report Post  
Posted to microsoft.public.excel.programming
XP XP is offline
external usenet poster
 
Posts: 389
Default Get file reference using File System Object

Hi,

Thanks; unfortunately our internet Nazi's have that site blocked;
is there a chance you could point me to another site or perhaps
just throw me a bone with the next line of code I need...?

Thanks so much!

"Gary''s Student" wrote:

see Bob Phillips's post:

http://groups.google.com/group/micro...o&rnum=1&hl=en
--
Gary''s Student - gsnu200821


"XP" wrote:

Hi,

I need to get a reference to a text file using the file system object; here
is what I have far:

Dim oFSO As Object
Dim oFile As Object
Set oFSO = CreateObject("Scripting.FileSystemObject")


Can someone please help me out with this and post what I still need using a
generic file path/filename?

Thanks

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,058
Default Get file reference using File System Object

First include a reference to Microsoft Scripting Runtime and then:

Sub xp()
Dim FSO As Scripting.FileSystemObject
Dim FileItem As Scripting.File
Set FSO = New Scripting.FileSystemObject
Set FileItem = FSO.Getfile("C:\test\A.ppt")
MsgBox (FileItem.Path)
MsgBox (FileItem.Size)
MsgBox (FileItem.Type)
MsgBox (FileItem.DateCreated)
Set FileItem = Nothing
Set FSO = Nothing
End Sub

If the POLICE allow, checkout:
http://msdn.microsoft.com/en-us/library/d6dw7aeh.aspx
or
http://msdn.microsoft.com/en-us/libr...t8(VS.85).aspx
--
Gary''s Student - gsnu200821


"XP" wrote:

Hi,

Thanks; unfortunately our internet Nazi's have that site blocked;
is there a chance you could point me to another site or perhaps
just throw me a bone with the next line of code I need...?

Thanks so much!

"Gary''s Student" wrote:

see Bob Phillips's post:

http://groups.google.com/group/micro...o&rnum=1&hl=en
--
Gary''s Student - gsnu200821


"XP" wrote:

Hi,

I need to get a reference to a text file using the file system object; here
is what I have far:

Dim oFSO As Object
Dim oFile As Object
Set oFSO = CreateObject("Scripting.FileSystemObject")


Can someone please help me out with this and post what I still need using a
generic file path/filename?

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
Counting backwards through the File System Object files collection signon77 Excel Programming 4 November 27th 08 02:45 AM
VBA and File System Object [email protected] Excel Programming 3 September 7th 06 06:21 PM
File System Object Jason Zischke Excel Programming 3 August 30th 06 07:52 AM
How do I close a file system object? Steph Excel Programming 2 March 8th 06 04:09 AM
File System Object Neil Excel Programming 2 September 10th 03 05:01 PM


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

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

About Us

"It's about Microsoft Excel"