How can I open filedialog

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?
 
A

Allen Browne

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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top