FileExist doesn't work
Hi Adrian,
Ad an "s". = fso.FileExists( )
You can also use early binding to avoid syntax problems. Make a reference
to the Microsoft Scriptime Runtime library.
Dim fso as FileSystemObject
Set fso = new FileSystemObject
fso.(autocomplete will help you here)
......
Regards
Jean-Yves
"Adrian" wrote in message
...
Excel 2000, Windows 2000.
The code below fails at the second line "Object doesn't
support method"
(Both hu and student are strings with sensible values.)
I got the syntax from Excel's Help.
I've noticed that fileexist hasn't been turned into
FileExist, and though FileExist appears in the help index
it isn't found when I press F1...
If this method isn't available to me, can you suggest a
workaround?
Set fs = CreateObject("scripting.filesystemobject")
If fs.fileexist(hu & "\students\" & student & ".jpg") Then
' other stuff in here
End If
|