GetSaveFileName does not display dialog

Ed Jobe 186 Reputation points
2020-09-29T16:17:58.87+00:00

I have a class that wraps the GetSaveFileName api for use in VBA. I don't get any errors. The call just steps over the function without showing the dialog. I've done a lot of searching and suspect that this might be a bug introduced by Windows 10. It used to work just fine. Does anyone have any ideas?

Windows API - Win32
Windows API - Win32
A core set of Windows application programming interfaces (APIs) for desktop and server applications. Previously known as Win32 API.
2,613 questions
{count} votes

Accepted answer
  1. Ed Jobe 186 Reputation points
    2020-09-29T16:33:01.39+00:00

    Wouldn't you know it. As soon as I posted the question, one last search determined the answer. My sub used the Len function instead of LenB

    Public Function ShowSave() As String
    Dim strTemp As String
    Dim udtStruct As OPENFILENAME
    udtStruct.lStructSize = LenB(udtStruct)

    0 comments No comments

0 additional answers

Sort by: Most helpful

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.