Open File Dialog

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • etorasso
    New Member
    • Sep 2007
    • 12

    Open File Dialog

    I am using Access 2010 (64 bit). I had no problem with the Access 2003 using the GetOpenFileName function with the "comdlg32.d ll" declaration. With Access 2010 (64 bit) this does not work. I have found the following code on the web to show the Windows open file dialog box. How do I retrieve the path and file name that was selected?

    Here is what I found to open the dialog box;
    Code:
    Private Sub cmdFileDialog_Click()
    Dim f    As Object
    Set f = Application.FileDialog(3)
    f.AllowMultiSelect = True
    f.Show
    MsgBox "file choosen = " & f.selecteditems.Count
    End Sub
    Thanks,

    ET
    Last edited by zmbd; Nov 25 '13, 07:16 PM. Reason: [Z{Please use the [CODE/] button to format posted code/html/sql/formated text - Please read the FAQ}]
  • zmbd
    Recognized Expert Moderator Expert
    • Mar 2012
    • 5501

    #2
    Please read thru the following insight article, it explains things in great detail.
    Select a File or Folder using the FileDialog Object

    Comment

    Working...