This is a classic case where VBA behaves exactly as it's told, but not as the programmer expects. The user's `GetSaveAsFilename` method is correctly opening the SharePoint folder, yet the filename field remains blank. The root cause is almost certainly the length or complexity of the initial file path string when combined with the `InitialFileName` parameter. SharePoint URLs, especially those with deep folder structures and spaces, can exceed the character limit that the dialog box's underlying Windows API accepts. The code itself is logically sound; the environment is the bottleneck.
For anyone building similar automation, the practical takeaway is that `GetSaveAsFilename` has a hard limit on the full string it passes to the file dialog. When you concatenate a long SharePoint path with a formatted date string, the total can cross that threshold silently, no error, just a stubbornly empty filename box. The fix is straightforward: shorten the base path or simplify the filename. You might map the SharePoint folder to a local drive letter, or break the path into a variable that stays under 256 characters before the dialog call. Alternatively, consider bypassing `GetSaveAsFilename` entirely and using `Application.FileDialog(msoFileDialogSaveAs)`, which handles longer paths more reliably.
This isn't a flaw in the user's logic, it's a reminder that VBA's dialog methods were designed before cloud storage and deep SharePoint hierarchies became the norm. The user's approach is intelligent: they're building a one-click snapshot tool that respects the team's existing folder structure and naming convention. That's exactly the kind of user-centered automation that saves hours over manual saves. The solution requires only a small adjustment to the path, not a rewrite of the workflow. Once that path is trimmed or mapped, the filename will populate as intended, and the button will deliver the smooth, reliable experience the user is aiming for.