vba excel get file name
How to extract file name from FullPath string using VBA. Extract Name of the File from Path / Fullname using VBA. There are many methods to extract the filename from a given string. You can use FileSystemObject's function GetFileName or can use Arrays to get the last element of the array split by path separator. Here we use even simpler functions like Dir and InStrRev to achieve the same.