how to use msoFileDialogFolderPicker ?

G

Guest

I'm not sure if I'm using this right. The following code lets me choose a
folder, but it does not show what files are in it. This means the user has
to check that the folder is correct (using Explorer or My Computer) before
committing the dialog selection.


Private Sub cmdChangeFolder_Click()

' N.B. Need to write a custom dialog that shows files in folder
' (so user know the bloody thing isn't empty!)

With Application.FileDialog(msoFileDialogFolderPicker)
.AllowMultiSelect = False
.Show
pubInputFolder = .SelectedItems(1)
txtFolder = pubInputFolder
End With

End Sub


Is there something else I should be doing?

Thanks!
 
G

Gert

Hi Alex,

I have tried out this code successfully, however, the number of files you
can select is quite limited (less than 25 in my case). I would like to extend
this to up to 200 files. Can you help me out?

Thanks
Gert
 
A

Alex Dybenko

Hi Gert,
well, not sure i can anything do here, if this is api limitation. I think
you can consider loading files into listbox and let user select there, or
into temp table and select in datasheet form.

--
Best regards,
___________
Alex Dybenko (MVP)
http://accessblog.net
http://www.PointLtd.com
 

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