+ Reply to Thread
Results 1 to 4 of 4

getting filenames from a user selected folder

  1. #1
    Mitch
    Guest

    getting filenames from a user selected folder

    I need to have the user select a folder using msoFileDialogFolderPicker then
    get the count and file names of all files in the folder. Please help!

  2. #2
    Forum Guru Norie's Avatar
    Join Date
    02-02-2005
    Location
    Stirling, Scotland
    MS-Off Ver
    Microsoft Office 365
    Posts
    19,643
    Why not use the GetOpenFilename method?

  3. #3
    Tushar Mehta
    Guest

    Re: getting filenames from a user selected folder

    Help with what? If you know you have to use msoFileDialogFolderPicker
    you have to know the context in which it makes sense. So, where are
    you stuck?

    --
    Regards,

    Tushar Mehta
    www.tushar-mehta.com
    Excel, PowerPoint, and VBA add-ins, tutorials
    Custom MS Office productivity solutions

    In article <[email protected]>,
    [email protected] says...
    > I need to have the user select a folder using msoFileDialogFolderPicker then
    > get the count and file names of all files in the folder. Please help!
    >


  4. #4
    Mitch
    Guest

    RE: getting filenames from a user selected folder

    I found a way to accomplish this...

    With Application.FileDialog(msoFileDialogFolderPicker)
    .AllowMultiSelect = False
    .Show
    THEpath = .SelectedItems(1)
    End With
    With Application.FileSearch
    .LookIn = THEpath
    .FileType = msoFileTypeExcelWorkbooks
    .Execute
    ALLcount = .FoundFiles.Count
    For i = 0 To ALLcount - 1
    ALLpaths(i) = .FoundFiles(i + 1)
    Next i
    End With
    -----------------
    "Mitch" wrote:

    > I need to have the user select a folder using msoFileDialogFolderPicker then
    > get the count and file names of all files in the folder. Please help!


+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1