%SAVEFILENAME% not working

Hi all,

Using %SAVEFILENAME% in the Application Title field does not seem to work anymore.

To explain with an example… I created a project called TEST.exe. Whenever I load it and save a .xlsc file (and I give that .xlsc file a unique name, e.g. MYDUMMYFILE), that unique file name never appears in the top bar whenever I launch that .xlsc file. The only title that ever appears in the top bar is “TEST” (i.e. the .exe name).

According to the GDG support team, in recent Office releases Excel does not take account of the application’s title set by developers anymore.

Has anyone got a solution for this? Even if it can be resolved via VBA, that will help.


Maybe instead of trying to display the filename in the title’s bar, you could display it somewhere in your Excel workbook?

I can put the file name elsewhere in the workbook, but for my specific purpose its quite clunky.

If an .xlsc file gets saved a with certain name, then gets renamed at a later point, I need to manually update that name somewhere in the workbook. Otherwise, I have no visibility of what the workbook’s actual file name is when the file is open.

Excel users are always accustomed to automatically seeing the file name in the title bar. So for UX purposes, ideally that’s where I want it visible.

I’m open to hearing workaround solutions on this.

Just in case someone else needs it, you can retrieve the filename of the current save file selected by the end user thanks to that VBA code snippet:

Thanks for that tip. I gave it a test and it worked.

As per your point, running the VBA script you provided gave me the complete file path (as opposed to just the file name).

Do you know what change to the script would give just the file name only?