Results 1 to 3 of 3
  1. #1
    swenger is offline Competent Performer
    Windows 10 Access 2016
    Join Date
    Mar 2016
    Posts
    151

    msoFileDialogOpen

    I am trying to build code to store a file location which a user chooses. I found many different ways but all include the following:

    Application.FileDialog(msoFileDialogOpen)

    I have the Object checked in Tools / Reference, yet I get a run time error with the method 'fileDialog failed...

  2. #2
    ssanfu is offline Master of Nothing
    Windows XP Access 2010 32bit
    Join Date
    Sep 2010
    Location
    Anchorage, Alaska, USA
    Posts
    9,664
    Do you have a reference set to "Microsoft Scripting RunTime"?


    Check out Chip Pearson's site: http://www.cpearson.com/excel/browsefolder.aspx

    Towards the bottom is a header "Using The FileDialog Method".

    I use the code under the header "Using The Windows API Functions" - the function "BrowseFolderExplorer" from the downloadable module at the bottom of the Introduction section. (see the line: "You can download a module file containing the code described on this page")
    Last edited by ssanfu; 07-27-2016 at 02:39 PM. Reason: spelling

  3. #3
    swenger is offline Competent Performer
    Windows 10 Access 2016
    Join Date
    Mar 2016
    Posts
    151
    The API one didnt work for me. But I tried the second option using the Shell Command and this worked perfectly.

    Thanks,

Please reply to this thread with any new information or opinions.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums