Relative Content

Tag Archive for excelvbaspecial-charactersfile-copying

GetFile doesn’t work with files which names contain of special characters

I have a VBA macro that loops through the files in a specified path, chooses the file with the newest date and writes the path of the file into a variable “FileToCopy”.
Unfortunately if the newest file contains any special characters (in my case it’s a letter: “ż”), VBA reads it as “z”. So a file “sprzedaż” becomes “sprzedaz”. Then this line of code: