I am trying to access an existing .jpg file with the following procedure:
Public Sub Check_For_Files(Filespec As String)
Dim fs, f, s
Dim Filespec_2 As String
Set fs = CreateObject("Scripting.FileSystemObject")
Filespec_2 = Filespec & ".jpg"
Set f = fs.GetFile(Filespec_2)
s = f.DateCreated
MsgBox s
End Sub
where Filespec = path to file & file name e.g. C:\Dean\Test_1010
I get a file not found error at the GetFile function.
Any suggestions?
Public Sub Check_For_Files(Filespec As String)
Dim fs, f, s
Dim Filespec_2 As String
Set fs = CreateObject("Scripting.FileSystemObject")
Filespec_2 = Filespec & ".jpg"
Set f = fs.GetFile(Filespec_2)
s = f.DateCreated
MsgBox s
End Sub
where Filespec = path to file & file name e.g. C:\Dean\Test_1010
I get a file not found error at the GetFile function.
Any suggestions?