Не похоже, что есть удобная встроенная функция, поэтому вам придется выполнить некоторые манипуляции со строками:
' Get just the file name and extension
lastPathIndex = InStrRev(MyFile, Application.PathSeparator)
If lastPathIndex >= 1 Then
MyFile = Right(MyFile, Len(MyFile) - lastPathIndex)
End If
' Now get the file name without the extension
lastDotIndex = InStrRev(MyFile, ".")
If lastDotIndex >= 1 Then
MyFile = Left(MyFile, lastDotIndex - 1)
End If
' MyFile now contains just the filename