Vba – how to do reverse index in VBA


I don't know anything about VBA but I need to get the file name out of a file full path.

So for a string like "c:\something\somethingelse\file.name" I need to get "file.name" out. Also how can you get a quote in a string such as " " "? backslash doesn't seem to work.

Best Solution

To get a quote in a string use two quotes ("")

To find the location of the slash from the end, use InstrRev()

Related Question