ChrisUK
Well-known Member
- Joined
- Sep 3, 2002
- Messages
- 675
Hi,
I wonder if someone can see what I'm doing wrong here
What I thought was a very simple function. In a worksheet cells I have the file name - GetFileDetails("u:\documents\stuff.txt"). I know the file exists but but I always get an error, when I debug it the error is file not found.
Thanks in anticipation
Chris
I wonder if someone can see what I'm doing wrong here
What I thought was a very simple function. In a worksheet cells I have the file name - GetFileDetails("u:\documents\stuff.txt"). I know the file exists but but I always get an error, when I debug it the error is file not found.
Thanks in anticipation
Chris
Code:
Function GetFileDetails(fn As String) As String
'
On Error GoTo ErrHandler
GetFileDetails = FileDateTime("fn")
GoTo EndFunc
ErrHandler:
GetFileDetails = "File Not Found"
EndFunc:
End Function
Last edited by a moderator: