If the filename also has its path with it...
FileNameOnly = Mid(Left(PathAndFilename, InStrRev(PathAndFilename, _
".") - 1), InStrRev(PathAndFilename, "\") + 1)
If the filename is by itself (that is, without its path)...
FileNameOnly = Left(FilenameAndExtension, _
InStrRev(PathAndFilename, ".") - 1)