Extracting filename
Use the instrRev function to get the last \
sFile = "C:\mydocumentspath\subpath\myfile.xls"
iPos = InStrRev(sFile, "\")
If iPos 0 Then
Debug.Print Right(sFile, Len(sFile) - iPos)
End If
--
HTH
RP
(remove nothere from the email address if mailing direct)
"Nigel" wrote in message
...
Hi All
In a file open dialog I get the full file path and filename and extension.
eg
What is the best method to extract the filename extension only eg
myfile.xls
--
Cheers
Nigel
|