Hello,
I run into the same problem, and someone send me a great module. Here it comes:
Public Function getfilename(pathname As Variant)
Dim myloop As Integer
Dim kees
For myloop = Len(pathname) To 1 Step -1
getfilename = getfilename & Mid(pathname, myloop, 1)
Next myloop
'use this in the debug window to get the filename: ?Right(pathname, (InStr(getfilename(pathname), "\") - 1))
'Example: ?Right("c:\test\kjdf\1234.jpg", (InStr(getfilename("c:\test\kjdf\1234.jpg"), "\") - 1))
End Function
Hope this helps.
Greetings,
Albert
[This message has been edited by raindrop3 (edited 01-07-2002).]