Results 1 to 7 of 7
  1. #1
    pkstormy's Avatar
    pkstormy is offline Access/SQL Server Expert
    Windows XP Access 2003
    Join Date
    Mar 2010
    Location
    Madison
    Posts
    682

    Browse For Folder Example


    The attached is an example of vba code to browse for a folder.

    I like this method since it doesn't depend on other API modules to be imported.

    Also coded:
    1. The ImportOrExport button will be enabled or disabled depending on if a folder is selected.
    2. 'Open Folder' button added so you can easily open the selected folder.

    Also Note: The browse coding itself is gotten from the website mentioned in the comments. I am not the author of the browse code and cannot verify the author in the comments as the original (I just did the other coding.) I believe there is similar code on Allan Browne's website.

  2. #2
    ajetrumpet is offline VIP
    Windows Vista Access 2007
    Join Date
    Mar 2010
    Location
    N/A
    Posts
    2,694
    storm,

    what else does it do besides open a dialog? Did you know that you can do that with the FSO? It takes 3 lines of code.

    I might not have looked at it all. So what else is there?

  3. #3
    pkstormy's Avatar
    pkstormy is offline Access/SQL Server Expert
    Windows XP Access 2003
    Join Date
    Mar 2010
    Location
    Madison
    Posts
    682
    Adam,

    The dialog popup displays the folder structure differently (not all collapsed - easier to navigate) and you can add a message into the dialog popup box such as "Select Folder to Export to".

  4. #4
    ajetrumpet is offline VIP
    Windows Vista Access 2007
    Join Date
    Mar 2010
    Location
    N/A
    Posts
    2,694
    ummm....okie dokie!

    Hope it's useful to folks!

  5. #5
    pkstormy's Avatar
    pkstormy is offline Access/SQL Server Expert
    Windows XP Access 2003
    Join Date
    Mar 2010
    Location
    Madison
    Posts
    682
    It's another way. I like it better than the FSO method since it uses the Shell.dll and is more customizable.

  6. #6
    pkstormy's Avatar
    pkstormy is offline Access/SQL Server Expert
    Windows XP Access 2003
    Join Date
    Mar 2010
    Location
    Madison
    Posts
    682
    Quote Originally Posted by ajetrumpet View Post
    ummm....okie dokie!

    Hope it's useful to folks!
    If even one person finds it useful, I've at least helped that one person.

  7. #7
    ha-ab is offline Novice
    Windows 7 64bit Access 2010 32bit
    Join Date
    Jan 2012
    Posts
    1

    example file

    hi
    thanks for this file
    i very search it.


Please reply to this thread with any new information or opinions.

Similar Threads

  1. Browse to external file while in a form
    By michaeljohnh in forum Import/Export Data
    Replies: 9
    Last Post: 09-22-2010, 09:33 AM
  2. Enter a folder name and open that folder
    By pkstormy in forum Code Repository
    Replies: 0
    Last Post: 09-05-2010, 04:39 PM
  3. Displaying images from another folder
    By w3leon in forum Access
    Replies: 0
    Last Post: 01-30-2009, 06:18 PM
  4. Browse for file
    By ccpine@comcast.net in forum Database Design
    Replies: 0
    Last Post: 08-24-2008, 10:12 AM
  5. Browse Option
    By emilylu3 in forum Access
    Replies: 1
    Last Post: 01-10-2006, 09:46 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums