View Single Post
Old Mar 23rd, 2008, 9:57 PM   #3
null_ptr0
12 years old
 
Join Date: Nov 2007
Posts: 105
Rep Power: 0 null_ptr0 is an unknown quantity at this point
Re: FileSystemObject

Scripting.FileSystemObject is an activex control object, and the function returns whether or not the argument filespec exists.
it should be (i believe):
Function rfs(ByVal filespec As String) As String
  Dim fso, Msg
  Set fso = CreateObject("Scripting.FileSystemObject")
  If (fso.FileExists(filespec)) Then
    Msg = "YES"
  Else
    Msg = "NO"
  End If
  rfs = Msg
End Function
null_ptr0 is offline   Reply With Quote