How can I open filedialog

  • Thread starter Thread starter Nova
  • Start date Start date
N

Nova

I try copy this code from Northwind to my form.

Dim dlgOpen As FileDialog

Set dlgOpen = Application.FileDialog( _
FileDialogType:=msoFileDialogOpen)

With dlgOpen
.AllowMultiSelect = True
.Show
End With

when I click button
it show me "User defined type not defined"

What should I do?
 
Nova, I do the same thing Duane suggested, and would encourage you do do so
also as there are problems with the FileDialog object.

The API call can look a bit scary when you first see it, but it's largely
copy'n'paste stuff.

If you wanted the FileSearch functionality, David Fenton recently posted a
replacement for it:
http://dfenton.com/DFA/download/Access/FileSearch.html
His initial sample had some bugs: hopefully it's operational now.
 
Back
Top