I'm trying to get the last part of a filename from the last "\" character. As an example I have:
"\\servername\folder1\folder2\folder3\filename.xls" All I want is the bit "filname.xls". The problem is that the filename length will vary, so I was trying to use Right, but I wont know how many characters to use. If I use too many I will end up with "der3\filename.xls". I thought maybe using Instr somehow, but I can't think of how to find the last occurance of "\". Any ideas?
"\\servername\folder1\folder2\folder3\filename.xls" All I want is the bit "filname.xls". The problem is that the filename length will vary, so I was trying to use Right, but I wont know how many characters to use. If I use too many I will end up with "der3\filename.xls". I thought maybe using Instr somehow, but I can't think of how to find the last occurance of "\". Any ideas?