Results 1 to 5 of 5
  1. #1
    Silver Lounger
    Join Date
    Mar 2001
    Location
    Springfield, Ohio, USA
    Posts
    2,136
    Thanks
    0
    Thanked 1 Time in 1 Post

    BrowseForFolder (Any)

    I'm looking for a BrowseForFolder dialog box that allows you to select multiple folders and shows the tree-view checkbox before each folder. I want it to look like the attached Norton dialog, but with just a simple checkmark when the folder has been selected. Anyone know of some free code/control? TIA --Sam
    Attached Images Attached Images
    <font face="Comic Sans MS">Sam Barrett, CACI </font face=comic>
    <small>And the things that you have heard... commit these to faithful men who will be able to teach others also. 2 Timothy 2:2</small>

  2. #2
    5 Star Lounger
    Join Date
    Jul 2002
    Location
    Toronto, Ontario, Canada
    Posts
    1,139
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: BrowseForFolder (Any)

    Sam,

    There is none that I have ever come across, but that doesn't mean it doesn't exist.

    However, you can simulate it with a TreeView control that has a check box and an image list with folder images and assign them to the nodes.

    But you'd have to fill the TreeView and assign the images yourself.
    --
    Bryan Carbonnell - Toronto <img src=/S/flags/Ontario.gif border=0 alt=Ontario width=30 height=18> <img src=/S/flags/Canada.gif border=0 alt=Canada width=30 height=18>
    Unfortunately common sense isn't so common!!
    Visit my website for useful Word, Excel and Access code, templates and Add-Ins

  3. #3
    Silver Lounger
    Join Date
    Mar 2001
    Location
    Springfield, Ohio, USA
    Posts
    2,136
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: BrowseForFolder (Any)

    Don't think I've ever programmed the TreeView, guess that it is time to start. I won't bother with folder icons, just the checkbox. Would you use the Scripting.FileSystemObject to generate the list of SubFolders? Is the TreeView part of VBA or just VB? I couldn't even find any sample TreeView code, everyone just posts variations on the BrowseForFolder API call. Right now I'm too busy, so I'm just requiring them to move everything into a single parent folder so I can use a simple Shell32.BrowseForFolder. Thanks! --Sam
    <font face="Comic Sans MS">Sam Barrett, CACI </font face=comic>
    <small>And the things that you have heard... commit these to faithful men who will be able to teach others also. 2 Timothy 2:2</small>

  4. #4
    5 Star Lounger
    Join Date
    Jul 2002
    Location
    Toronto, Ontario, Canada
    Posts
    1,139
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: BrowseForFolder (Any)

    Sam,

    The TreeView is part of mscomctl.ocx. It part of both, sort of. If you have the Office Developer's Edition, then you should have the OCX, but more importantly you will have the license to distribute the OCX. It's definately part of VB.

    I personally don't use the FSO at all. I've heard of too many Sys Admins disabling it to rely on it. So,I would probably use Dir and the other low-level File IO commands to fill the tree.

    If you want to have a look at some VBA code for using the TreeView, have a look at my website (link in my sig) and follow the Utilities link and look for the ListAllVBAVariables utility.

    There are versions for Word 97 and above, Excel 97 and Above Access 2000 and above so you can pick your choice of Development Environments.

    Let me know if you have any questions about the code.
    --
    Bryan Carbonnell - Toronto <img src=/S/flags/Ontario.gif border=0 alt=Ontario width=30 height=18> <img src=/S/flags/Canada.gif border=0 alt=Canada width=30 height=18>
    Unfortunately common sense isn't so common!!
    Visit my website for useful Word, Excel and Access code, templates and Add-Ins

  5. #5
    5 Star Lounger
    Join Date
    Jul 2002
    Location
    Toronto, Ontario, Canada
    Posts
    1,139
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: BrowseForFolder (Any)

    Sam,

    I just stumbled across this Folder TreeView from the Common Controls Replacement Project, http://www.mvps.org/ccrp/controls/ccrpftv6.htm which may be of use.
    --
    Bryan Carbonnell - Toronto <img src=/S/flags/Ontario.gif border=0 alt=Ontario width=30 height=18> <img src=/S/flags/Canada.gif border=0 alt=Canada width=30 height=18>
    Unfortunately common sense isn't so common!!
    Visit my website for useful Word, Excel and Access code, templates and Add-Ins

Posting Permissions

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