PC Review


Reply
Thread Tools Rate Thread

how to use msoFileDialogFolderPicker ?

 
 
=?Utf-8?B?QWxsZW5fTg==?=
Guest
Posts: n/a
 
      7th Jun 2007
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!

 
Reply With Quote
 
 
 
 
Alex Dybenko
Guest
Posts: n/a
 
      7th Jun 2007
Hi,
to select file (and folder) you can use this function:
http://www.mvps.org/access/api/api0001.htm

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

"Allen_N" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> 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!
>


 
Reply With Quote
 
 
 
 
=?Utf-8?B?QWxsZW5fTg==?=
Guest
Posts: n/a
 
      7th Jun 2007
Thanks, Alex!

"Alex Dybenko" wrote:

> Hi,
> to select file (and folder) you can use this function:
> http://www.mvps.org/access/api/api0001.htm
>
> --
> Best regards,
> ___________
> Alex Dybenko (MVP)
> http://alexdyb.blogspot.com
> http://www.PointLtd.com
>
> "Allen_N" <(E-Mail Removed)> wrote in message
> news:(E-Mail Removed)...
> > 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!
> >

>
>

 
Reply With Quote
 
Gert
Guest
Posts: n/a
 
      9th Apr 2008
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

"Alex Dybenko" wrote:

> Hi,
> to select file (and folder) you can use this function:
> http://www.mvps.org/access/api/api0001.htm
>
> --
> Best regards,
> ___________
> Alex Dybenko (MVP)
> http://alexdyb.blogspot.com
> http://www.PointLtd.com
>
> "Allen_N" <(E-Mail Removed)> wrote in message
> news:(E-Mail Removed)...
> > 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!
> >

>
>

 
Reply With Quote
 
Alex Dybenko
Guest
Posts: n/a
 
      9th Apr 2008
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


"Gert" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> 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
>
> "Alex Dybenko" wrote:
>
>> Hi,
>> to select file (and folder) you can use this function:
>> http://www.mvps.org/access/api/api0001.htm
>>
>> --
>> Best regards,
>> ___________
>> Alex Dybenko (MVP)
>> http://alexdyb.blogspot.com
>> http://www.PointLtd.com
>>
>> "Allen_N" <(E-Mail Removed)> wrote in message
>> news:(E-Mail Removed)...
>> > 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!
>> >

>>
>>


 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Opening each file in a folder using msoFileDialogFolderPicker Ayo Microsoft Excel Misc 2 23rd Jan 2013 11:03 PM
can msoFileDialogFolderPicker display file names in the folder Paul C Microsoft Excel Programming 3 19th Nov 2009 05:23 PM
Using Application.FileDialog(msoFileDialogFolderPicker) Ayo Microsoft Excel Misc 1 12th Mar 2008 02:01 PM
Use default, use blank, use current got disabled on ie =?Utf-8?B?Y2hpbm5h?= Windows XP Internet Explorer 2 28th Oct 2006 09:22 PM
FileDialog(msoFileDialogFolderPicker) not using the current direct =?Utf-8?B?bngz?= Microsoft Excel Programming 1 8th Aug 2006 01:19 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 02:40 AM.